Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1.  
  2. void getDevices() {
  3. PCI_CONFIG0* funcAddr;
  4. int cline = 0;
  5.  
  6. //bus
  7. for (int bus = 0; bus < 16; bus++) {
  8.  
  9. //device
  10. for (int device = 0; device < 32; device++) {
  11.  
  12. //function
  13. for (int function = 0; function < 8; function++) {
  14. wsprintf(szBuffer[cLine++], "Function Number:%d", function);
  15.  
  16. funcAddr = getAddrFunction(bus, device, function);
  17.  
  18. if (_inmw((DWORD_PTR)&funcAddr->VendorID) != 0xFFFF) {
  19. wsprintf(szBuffer[cLine++], "Class:%d", funcAddr->BaseClass);
  20. wsprintf(szBuffer[cLine++], "Sub-Class:%d", funcAddr->SubClass);
  21. wsprintf(szBuffer[cLine++], "Prog Interface:%d", funcAddr->ProgInterface);
  22. wsprintf(szBuffer[cLine++], "Vendor Sub-System:%d", funcAddr->SubSystVendorID);
  23. wsprintf(szBuffer[cLine++], "Sub-System:%d", funcAddr->SubSystID);
  24. //wsprintf(szBuffer[cLine++], "Class:%d", funcAddr->);
  25. }
  26. }
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement