0

I am trying to write an application that will detect all the USB devices connected to my computer. For this I have declared GUID and called the following functions to get the information about devices connected.


LPGUID guid;
HidD_GetHidGuid(guid);

HDEVINFO hDevInfo;

hDevInfo = SetupDiGetClassDevs(guid,NULL,NULL,DIGCF_PRESENT |

DIGCF_INTERFACEDEVICE);


But it give the following error ….

error LNK2019: unresolved external symbol _imp__SetupDiGetClassDevsA@16 referenced in function "public: void __thiscall

error LNK2019: unresolved external symbol "void __stdcall HidD_GetHidGuid(struct _GUID *)"

fatal error : LNK1120: 2 unresolved externals

I don’t understand that where am I making mistake? I have include the following header files :

Hidclass.h
Setupapi.h
Hidsdi.h


Can you please tell me what mistake am I making?

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by shazzzz...
0

Finally I got it I have included hdi.lib,setupapi.lib
I got these files from windows ddk
now it's compiling without any error.

thank you

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.