Jungo WinDriver  
Official Documentation

◆ WD_PciScanCaps

#define WD_PciScanCaps (   h,
  pPciScanCaps 
)
Value:
WD_FUNCTION(IOCTL_WD_PCI_SCAN_CAPS, h, pPciScanCaps, \
#define FALSE
Definition: kpstdlib.h:260
#define WD_FUNCTION
Definition: windrvr.h:1838
#define IOCTL_WD_PCI_SCAN_CAPS
Definition: windrvr.h:1655

Scans the specified PCI capabilities group of the given PCI slot for the specified capability (or for all capabilities).

Parameters
[in]hHandle to WinDriver's kernel-mode driver as received from WD_Open()
[in,out]pPciScanCapsPointer to a PCI capabilities scan structure
Returns
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise
WD_PCI_SCAN_CAPS pciScanCaps;
WD_PCI_CAP pciCap;
BZERO(pciScanCaps);
pciScanCaps.pciSlot = pciSlot; /* pciSlot = a WD_PCI_SLOT struct returned by
WD_PciScanCards() in pPciScan->cardSlot */
pciScanCaps.dwCapId = 0x05; /* Search for the MSI capability */
pciScanCaps.dwOptions = WD_PCI_SCAN_CAPS_BASIC; /* Scan the basic PCI
capabilities */
WD_PciScanCaps(hWD, &pciScanCaps);
if (pciScanCaps.dwNumCaps > 0) /* Found a matching capability */
{
pciCap = pciScanCaps.pciCaps[0]; /* Use the first capability found */
}
else
{
printf("PCI capability 0x%lx not found in the basic PCI capabilities\n",
pciScanCaps.dwCapId);
}
WD_PCI_SLOT pciSlot
Scan Parameters.
Definition: windrvr.h:901
DWORD dwOptions
Scan options – WD_PCI_SCAN_CAPS_OPTIONS; default – WD_PCI_SCAN_CAPS_BASIC.
Definition: windrvr.h:904
WD_PCI_CAP pciCaps[WD_PCI_MAX_CAPS]
Array of matching PCI capabilities.
Definition: windrvr.h:909
DWORD dwNumCaps
Scan Results.
Definition: windrvr.h:908
DWORD dwCapId
PCI capability ID to search for, or WD_PCI_CAP_ID_ALL to scan all PCI capabilities.
Definition: windrvr.h:902
#define WD_PciScanCaps(h, pPciScanCaps)
Scans the specified PCI capabilities group of the given PCI slot for the specified capability (or for...
Definition: windrvr.h:2459
#define BZERO(buf)
Definition: windrvr.h:1548
@ WD_PCI_SCAN_CAPS_BASIC
Scan basic PCI capabilities.
Definition: windrvr.h:893

Definition at line 2459 of file windrvr.h.