Reads/writes from/to the PCI configuration space of a selected PCI card or the extended configuration space of a selected PCI Express card.
DWORD dwStatus;
pciConfig.
dwBytes =
sizeof(aBuffer);
if (dwStatus)
{
printf(
"WD_PciConfigDump failed: %s\n",
Stat2Str(dwStatus));
}
else
{
printf("Card in Domain 0, Bus 0, Slot 3, Funcion 0 has Vendor ID %x "
"Device ID %x\n", aBuffer[0], aBuffer[1]);
}
const char *DLLCALLCONV Stat2Str(_In_ DWORD dwStatus)
Retrieves the status string that corresponds to a status code.
WD_PCI_SLOT pciSlot
PCI slot information.
DWORD dwBytes
Input – number of bytes to read/write; Output – number of bytes read/written.
PVOID pBuffer
Pointer to a read/write data buffer.
DWORD dwOffset
PCI configuration space offset to read/write.
DWORD fIsRead
1 – read data; 0 – write data
DWORD dwFunction
Function number.
DWORD dwDomain
Domain number.
#define WD_PciConfigDump(h, pPciConfigDump)
Reads/writes from/to the PCI configuration space of a selected PCI card or the extended configuration...