Note NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.
NdisWritePciSlotInformation writes a specified number of bytes to the PCI configuration space for a NIC on the PCI bus.
ULONG NdisWritePciSlotInformation( _In_ NDIS_HANDLE NdisAdapterHandle, _In_ ULONG SlotNumber, _In_ ULONG Offset, _In_ PVOID Buffer, _In_ ULONG Length );
Specifies the MiniportAdapterHandle passed in to MiniportInitialize and to most other MiniportXxx functions.
Reserved. NDIS ignores this parameter.
Specifies the byte offset within the PCI configuration space at which to begin transferring the caller-supplied configuration information.
Pointer to a caller-allocated buffer containing the PCI configuration information to be written.
Specifies the size in bytes of the buffer at Buffer and, therefore, how many bytes of PCI configuration information to write.
NdisWritePciSlotInformation returns how many bytes of caller-supplied data it wrote.
NdisWritePciSlotInformation writes PCI configuration information for a NIC. However, drivers of NICs on PCI buses call NdisImmediateReadPciSlotInformation, NdisReadPciSlotInformation, or NdisMPciAssignResources far more frequently than this function.
When NIC driver finds its device on a PCI bus with Ndis(Immediate)ReadPciSlotInformation or by retrieving information from the \DriverName\Parameters key in the registry, that driver can call NdisMPciAssignResources to determine the bus-relative configuration parameters it can use in subsequent calls to other NdisXxx configuration functions. If NdisMPciAssignResources returns values that require the driver to reconfigure its device on the bus, it can call NdisWritePciSlotInformation.
NdisWritePciSlotInformation transfers the same type of bus-relative PCI configuration information as NdisImmediateWritePciSlotInformation. However, callers of NdisWritePciSlotInformation 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 NdisWritePciSlotInformation returns control.
Callers of NdisWritePciSlotInformation must run at IRQL <= DISPATCH_LEVEL. Usually, callers are running at IRQL = PASSIVE_LEVEL.
Not supported for NDIS 6.0 drivers in Windows Vista. Use NdisMSetBusDatainstead. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.
|Ndis.h (include Ndis.h)|
<= DISPATCH_LEVEL (See Remarks section)