RtnEnumPciCards
RtnEnumPciCards calls the fnCheckPciCard function for every PCI card found within the system (or until fnCheckPciCard returns TRUE).
Syntax
BOOL RtnEnumPciCards(
int (*fnCheckPciCard)
(
PPCI_COMMON_CONFIG pPciInfo,
ULONG bus,
PCI_SLOT_NUMBER SlotNumber,
PVOID pCardInfo,
int fMacAddressPresent
),
PVOID pUserInfo
int fMacAddressPresent
);
Parameters
fnCheckPciCard
Pointer to a user supplied card check function
pUserInfo
Pointer to user data passed to the fnCheckPciCard function
Return Value
TRUE if card was found (fnCheckPciCard returned TRUE), FALSE if card was not found (fnCheckPciCard never returned TRUE)
Remarks
RtnEnumPciCards is used to locate a PCI NIC. The fnCheckPciCard function will be called with pointers to the PCI Common Configuration data block, the bus number, the slot number and a pointer to user supplied data structure. The user supplied information pointer is normally a pointer to the local configuration data structure.
The driver writer should check the PCI Common Configuration data block to determine if this PCI card matches the parameters of the NIC that the driver supports. The driver can also check the Ethernet Address to determine an exact match, if more than one card of the same type exists in the system.
Once a match occurs, the fnCheckPciCard should return TRUE, and RtnEnumPciCards will return with a success indication (TRUE). If fnCheckPciCard is passed a PCI configuration which does not match the NIC in question, fnCheckPciCard should return FALSE. In this case RtnEnumPciCards will not immediately return, but rather fnCheckPciCard will be called again with the next PCI card in the system. fnCheckPciCard will continue to be called until it returns TRUE or there are no more PCI cards that have not been checked.
Requirements
Minimum Supported Version | RTX64 2013 |
Header | rtnapi.h |
Library | RtTcpip.lib |