This function writes a specified number of bytes to the PCI configuration space for an NIC on the PCI bus.
Header file: | Ndis.h |
Windows CE versions: | 2.0 and later |
ULONG NdisWritePciSlotInformation(
IN NDIS_HANDLE NdisAdapterHandle, IN ULONG SlotNumber,
IN ULONG Offset, IN PVOID Buffer, IN ULONG Length );
Returns how many bytes of caller-supplied data it wrote.
This function writes PCI configuration information for an NIC. However, drivers of NICs on PCI buses call the NdisImmediateReadPciSlotInformation, NdisReadPciSlotInformation, or NdisMPciAssignResources function far more frequently than this function.
When an NIC driver finds its device on a PCI bus with the Ndis( Immediate )ReadPciSlotInformation function or by retrieving information from the \DriverName\Parameters key in the registry, that driver can call NdisMPciAssignResources to determine the bus-relative configuration parameters to use in subsequent calls to other NDIS configuration functions. If NdisMPciAssignResources returns values that require the driver to reconfigure its device on the bus, it can call this function.
This function transfers the same type of bus-relative PCI configuration information as the NdisImmediateWritePciSlotInformation function. However, callers of this function pass the MiniportAdapterHandle passed in to the MiniportInitialize function, rather than the WrapperConfigurationContext handle.
The caller is responsible for releasing the memory at Buffer when this function returns control.
A driver that calls this function can run at IRQL <= DISPATCH_LEVEL. Usually, callers are running at IRQL PASSIVE_LEVEL.
NdisFreeMemory, NdisMMapIoSpace, NdisMPciAssignResources, NdisMRegisterInterrupt, NdisMRegisterIoPortRange, NdisMSetAttributes, NdisMSetAttributesEx, NdisReadPciSlotInformation