Click here to Skip to main content
       

C / C++ / MFC

 
GeneralRe: How Static variable persists/retains its value.? PinmemberPecuniousPete10-Dec-12 7:58 
GeneralRe: How Static variable persists/retains its value.? Pinmembersajeesh.c10-Dec-12 16:50 
GeneralRe: How Static variable persists/retains its value.? PinmemberPecuniousPete11-Dec-12 7:18 
QuestionVC6.0 compiler error C2664 while using GUID PinmemberVaclav_Sal9-Dec-12 5:44 
I am in over my head again.
I am getting error C2664 and I did read the Tech note   ( something about ANSI improvement)   about it and frankly I just do not understand what is the problem and <b>how to fix it in VC6.0.</b>
 
Do I have to redefine the   GUID_DEVCLASS_COMPUTER?
 
The parameter GUID is defined in both functions as “const GUID*”
 
The API fails with this error C2664 and C_GetClassImgIndex compiles OK
 
error C2664: 'SetupDiGetClassImageIndex' : cannot convert parameter 2 from 'const struct _GUID *' to 'struct _GUID *'
            Conversion loses qualifiers
 
Fails
b = SetupDiGetClassImageIndex(&m_imgList, &GUID_DEVCLASS_COMPUTER, &nRootImg);
 
OK
int n = C_GetClassImgIndex(&GUID_DEVCLASS_COMPUTER);
 
Any help would be greatly appreciated.
Cheers
Vaclav
AnswerRe: VC6.0 compiler error C2664 while using GUID PinmvpRichard MacCutchan9-Dec-12 6:02 
GeneralRe: VC6.0 compiler error C2664 while using GUID PinmemberVaclav_Sal9-Dec-12 7:14 
GeneralRe: VC6.0 compiler error C2664 while using GUID Pinmemberjschell9-Dec-12 8:16 
AnswerRe: VC6.0 compiler error C2664 while using GUID PinmemberPecuniousPete10-Dec-12 8:00 
AnswerRe: VC6.0 compiler error C2664 while using GUID PinmemberArild Fiskum19-Dec-12 10:18 
QuestionFork Implementation using the native API RtlCloneUserProcess Pinmemberakhilmv889-Dec-12 4:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 31 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid