Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void getDevices() {
- PCI_CONFIG0* funcAddr;
- int cline = 0;
- //bus
- for (int bus = 0; bus < 16; bus++) {
- //device
- for (int device = 0; device < 32; device++) {
- //function
- for (int function = 0; function < 8; function++) {
- wsprintf(szBuffer[cLine++], "Function Number:%d", function);
- funcAddr = getAddrFunction(bus, device, function);
- if (_inmw((DWORD_PTR)&funcAddr->VendorID) != 0xFFFF) {
- wsprintf(szBuffer[cLine++], "Class:%d", funcAddr->BaseClass);
- wsprintf(szBuffer[cLine++], "Sub-Class:%d", funcAddr->SubClass);
- wsprintf(szBuffer[cLine++], "Prog Interface:%d", funcAddr->ProgInterface);
- wsprintf(szBuffer[cLine++], "Vendor Sub-System:%d", funcAddr->SubSystVendorID);
- wsprintf(szBuffer[cLine++], "Sub-System:%d", funcAddr->SubSystID);
- //wsprintf(szBuffer[cLine++], "Class:%d", funcAddr->);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement