BOOL CyUSBDevice::ScanForHardwareChanges()
{
DEVINST devInst;
CONFIGRET status;
status = CM_Locate_DevNode(&devInst, NULL, CM_LOCATE_DEVNODE_NORMAL);
if (status != CR_SUCCESS) return FALSE;
status = CM_Reenumerate_DevNode(devInst, 0);
if (status != CR_SUCCESS) return FALSE;
MessageBox(NULL,"ScanHardwarechange","",MB_OK);
return TRUE;
} |