SetupDiGetDeviceRegistryProperty(hDevInfo, &DeviceInfoData, SPDRP_HARDWAREID,&dwPropertyRegDataType, (BYTE*)szDesc,sizeof(szDesc),&dwSize) S=szDesc n=48 while (s.Length()n) s=s.SubString(1,n) txt+=s+" " SetupDiGetDeviceRegistryProperty(hDevInfo, &DeviceInfoData, SPDRP_DEVICEDESC,&dwPropertyRegDataType, (BYTE*)szDesc,sizeof(szDesc),&dwSize) If (!SetupDiEnumDeviceInfo(hDevInfo, i, &DeviceInfoData)) break If (hDevInfo = INVALID_HANDLE_VALUE) return false ĭeviceInfoData.cbSize = sizeof(DeviceInfoData) HDevInfo = SetupDiGetClassDevs(NULL, TEXT("PCI"), NULL, DIGCF_PRESENT|DIGCF_ALLCLASSES) // List all connected PCI devices ![]() hDevInfo = SetupDiGetClassDevs(NULL, TEXT("USB"), NULL, DIGCF_PRESENT|DIGCF_ALLCLASSES) // List all connected USB devices ![]() hDevInfo = SetupDiGetClassDevs(NULL, NULL, NULL, DIGCF_PRESENT|DIGCF_ALLCLASSES) // List all devices In BDS2006 C++/VCL I am using this (I busted some time ago) just by changing the match string: //. ![]() If I try just "PCI" the results enum both PCI and PCI-E devices. You should look for PCI slot I do not see any PCI-E definitions in the strings (does not mean there are none).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |