NdisImmediateWritePciSlotInformation function

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.

NdisImmediateWritePciSlotInformation writes PCI configuration information from a caller-supplied buffer to a specified range in the PCI configuration space for the NIC.


ULONG NdisImmediateWritePciSlotInformation(
  _In_ NDIS_HANDLE WrapperConfigurationContext,
  _In_ ULONG       SlotNumber,
  _In_ ULONG       Offset,
  _In_ PVOID       Buffer,
  _In_ ULONG       Length


  • WrapperConfigurationContext [in]
    Specifies the handle passed to the caller's MiniportInitialize function.

  • SlotNumber [in]
    Reserved. NDIS ignores this parameter.

  • Offset [in]
    Specifies the byte offset within the PCI configuration space at which to begin transferring the caller-supplied configuration information.

  • Buffer [in]
    Pointer to a caller-allocated buffer containing the PCI configuration information to be written.

  • Length [in]
    Specifies the size in bytes of the buffer at Buffer and, therefore, how many bytes of PCI configuration information to write.

Return value

NdisImmediateWritePciSlotInformation returns the number of bytes written.


NdisImmediateWritePciSlotInformation 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. NdisImmediateWritePciSlotInformation cannot be called after the driver has claimed hardware resources in the registry for its NIC with NdisMQueryAdapterResources or NdisMPciAssignResources.

NdisImmediateWritePciSlotInformation transfers the same type of bus-relative PCI configuration information as NdisWritePciSlotInformation. However, callers of NdisWritePciSlotInformation pass the adapter handle, rather than the WrapperConfigurationContext handle that is valid only during NIC driver initialization.

Callers of NdisImmediateWritePciSlotInformation must run at IRQL <= DISPATCH_LEVEL. Usually, callers are running at IRQL = PASSIVE_LEVEL.


Target platform



Not supported for NDIS 6.0 drivers in Windows Vista. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP. Windows XP supports this function for legacy drivers. However, the Windows XP DDK will not build an NDIS driver that calls this function. Drivers should call NdisWritePciSlotInformationinstead.


Ndis.h (include Ndis.h)




<= DISPATCH_LEVEL (See Remarks section)

See also






Send comments about this topic to Microsoft