Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with VC98\INCLUDE

Status
Not open for further replies.

aidanh

Programmer
Aug 14, 2003
9
GB
I have been given a bit of source code which I am trying
to compile!

The code uses the functions

SetupDiGetClassDevs( ... )
SetupDiEnumDeviceInterfaces( ... )

which are in setupapi.lib

Unfortunately I get the error messages

error C2664: 'SetupDiGetClassDevsA' : cannot convert
parameter 1 from 'const struct _GUID *' to 'struct _GUID *'


looking at my .h files I see that param 1 takes a 'struct
_GUID' but in the msdn site it takes 'const struct _GUID'

I am led to believe my sdk is out of date!!

does anyone know where I can find the updates, I have
looked everywhere :(

I have already installed SP5

thank everyone and have a goog christmas :)

bob

 
put (struct _GUID *)yourGuid instead of just yourGuid

Ion Filipski
1c.bmp
 
1. I looks like you have a constant struct
2. You are not passing it as a pointer, use an & before your struct

Matt
 
>Zyrenthian
error C2664: 'SetupDiGetClassDevsA' : cannot convert
parameter 1 from 'const struct _GUID *[/color' to 'struct _GUID *'

The star above marked with red means in the code is a kind of pointer to GUID. The green one means compiller wants another kind of pointer to GUID. There is quite enough a pointer conversion.


Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top