INtime SDK Help
PciFindClass
INtime SDK v6 > About INtime > Other system libraries > PCI Library > PciFindClass

Locates a PCI device given the class ID, and a device index. This routine searches the local PCI bus and any secondary buses it finds. If the device index given is 0, the first device found whose class ID matches is returned. If greater than zero then successive devices are skipped until the counter has reached zero. For example, to find the second device of a given class, supply the value 1 in the wDeviceIndex field of the structure.

The wClassID and wDeviceIndex fields must be initialized before making this call.

BYTE PciFindClass(
    PCIDEV *pPciDevice
);

Parameters

pPciDevice
A pointer to a PCIDEV structure, initialized as described above.

Remarks

WARNING:   When a system designer decides to sparsely-populate the PCI structure on a given board, resulting in bus IDs with high numbers, the PCI scan can take a very long time because of having to scan a large number of empty buses. Systems with HP BIOSs are an example.

Return Values

TRUE
The given device was found. The PCIDEV structure is filled with the values from the PCI device header.
FALSE
The device was not found.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/pcibus.h pcibus.h pcibus.lib
See Also