#include <setupapi.h>
#pragma comment(lib, "setupapi.lib")
CHAR g_cVID[5] = {0};
CHAR g_cPID_RGB[5] = {0};
CHAR g_cPID_Infrared[5] = {0};
BOOL GetCameraUSB()
{
BOOL bRet = FALSE;
BOOL bPID_RGB = FALSE;
BOOL bPID_Infrared = FALSE;
LPGUID lpGuid = (LPGUID)&GUID_CLASS_USB_DEVICE;//
int INTERFACE_DETAIL_SIZE = 1024;
int nCount = 0;
HDEVINFO info = SetupDiGetClassDevs(lpGuid, NULL, NULL, DIGCF_PRESENT | DIGCF_INTERFACEDEVICE);
//enumerate device information
DWORD required_size = 0;
int i;
SP_DEVINFO_DATA DeviceInfoData = { sizeof(DeviceInfoData) };
DWORD DataT;
DWORD buffersize = 100;
DWORD req_bufsize = 0;
CHAR *did = new CHAR[100];
CHAR *lochd = new CHAR