Jungo WinDriver  
Official Documentation

◆ WD_PciConfigDump

#define WD_PciConfigDump (   h,
  pPciConfigDump 
)
Value:
WD_FUNCTION(IOCTL_WD_PCI_CONFIG_DUMP, h, pPciConfigDump, \
#define FALSE
Definition: kpstdlib.h:260
#define IOCTL_WD_PCI_CONFIG_DUMP
Definition: windrvr.h:1622
#define WD_FUNCTION
Definition: windrvr.h:1843

Reads/writes from/to the PCI configuration space of a selected PCI card or the extended configuration space of a selected PCI Express card.

Parameters
[in]hHandle to WinDriver's kernel-mode driver as received from WD_Open()
[in,out]pPciConfigDumpPointer to a PCI configuration space information structure
Returns
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise
DWORD dwStatus;
WORD aBuffer[2];
BZERO(pciConfig);
pciConfig.pciSlot.dwDomain = 0;
pciConfig.pciSlot.dwBus = 0;
pciConfig.pciSlot.dwSlot = 3;
pciConfig.pciSlot.dwFunction = 0;
pciConfig.pBuffer = aBuffer;
pciConfig.dwOffset = 0;
pciConfig.dwBytes = sizeof(aBuffer);
pciConfig.fIsRead = TRUE;
dwStatus = WD_PciConfigDump(hWD, &pciConfig);
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]);
}
#define TRUE
Definition: kpstdlib.h:264
const char *DLLCALLCONV Stat2Str(_In_ DWORD dwStatus)
Retrieves the status string that corresponds to a status code.
WD_PCI_SLOT pciSlot
PCI slot information.
Definition: windrvr.h:939
DWORD dwBytes
Input – number of bytes to read/write; Output – number of bytes read/written.
Definition: windrvr.h:944
PVOID pBuffer
Pointer to a read/write data buffer.
Definition: windrvr.h:940
DWORD dwOffset
PCI configuration space offset to read/write.
Definition: windrvr.h:943
DWORD fIsRead
1 – read data; 0 – write data
Definition: windrvr.h:946
DWORD dwBus
Bus number.
Definition: windrvr.h:852
DWORD dwFunction
Function number.
Definition: windrvr.h:854
DWORD dwSlot
Slot number.
Definition: windrvr.h:853
DWORD dwDomain
Domain number.
Definition: windrvr.h:850
#define WD_PciConfigDump(h, pPciConfigDump)
Reads/writes from/to the PCI configuration space of a selected PCI card or the extended configuration...
Definition: windrvr.h:2499
unsigned short int WORD
Definition: windrvr.h:333
#define BZERO(buf)
Definition: windrvr.h:1553

Definition at line 2499 of file windrvr.h.