Tutorial :SetupDiGetDeviceProperty usage example



Question:

Can anybody provide me with an example of using SetupDiGetDeviceProperty ?


Solution:1

The following code

#include <windows.h>  #include <devguid.h>    // for GUID_DEVCLASS_CDROM etc  #include <setupapi.h>  #include <cfgmgr32.h>   // for MAX_DEVICE_ID_LEN, CM_Get_Parent and CM_Get_Device_ID  #define INITGUID  #include <tchar.h>  #include <stdio.h>    //#include "c:\WinDDK\7600.16385.1\inc\api\devpkey.h"    // include DEVPKEY_Device_BusReportedDeviceDesc from WinDDK\7600.16385.1\inc\api\devpropdef.h  #ifdef DEFINE_DEVPROPKEY  #undef DEFINE_DEVPROPKEY  





        
Previous
Next Post »