NdisMWriteConfigBlock function

A miniport driver for a PCI Express (PCIe) Virtual Function (VF) calls the NdisMWriteConfigBlock function to write data to a VF configuration block. Write operations on a VF configuration block are handled by the miniport driver of the network adapter's PCIe Physical Function (PF).

Note  NdisMWriteConfigBlock must only be called by the miniport driver for a network adapter's VF.


NDIS_STATUS NdisMWriteConfigBlock(
  _In_  NDIS_HANDLE NdisMiniportHandle,
  _In_  ULONG BlockId,
  _In_  PVOID Buffer,
  _In_  ULONG Length


NdisMiniportHandle [in]

The network adapter handle that NDIS passed to the MiniportAdapterHandle parameter of MiniportInitializeEx.

BlockId [in]

A ULONG value that specifies the identifier of the configuration block to be written to. This identifier is proprietary to the independent hardware vendor (IHV) and is used only by the miniport drivers for the PF and VF on the network adapter.

Buffer [in]

A pointer to a caller-allocated buffer that contains the configuration data to be written.

Length [in]

The number of bytes to write to the configuration block.

Return value

NdisMWriteConfigBlock can return one of the following status values.

Return codeDescription

The write operation completed successfully.


The write operation failed.



The VF miniport driver calls NdisMWriteConfigBlock to initiate a backchannel write request of VF configuration data by the PF miniport driver. Once notified of this request, the PF driver writes the data to the specified VF configuration block.

A VF configuration block is used for backchannel communication between the PF and VF miniport drivers. The IHV can define one or more VF configuration blocks for the device. Each VF configuration block has an IHV-defined format, length, and block ID.

Note  Data from each VF configuration block is used only by the PF and VF miniport drivers.

For more information about backchannel communication within the single root I/O virtualization (SR-IOV) interface, see SR-IOV PF/VF Backchannel Communication.

Interfacing to a Virtual Bus Driver

If an independent hardware vendor (IHV) provides a virtual bus driver (VBD) as part of its SR-IOV driver package, its miniport driver must not call NdisMWriteConfigBlock. Instead, the driver must interface with the VBD through a private communication channel, and request that the VBD call WriteVfConfigBlock. This function is exposed from the GUID_VPCI_INTERFACE_STANDARD interface that is supported by the underlying virtual PCI (VPCI) bus driver.

The VBD that runs in a Hyper-V child partition's guest operating system can query the GUID_VPCI_INTERFACE_STANDARD interface by issuing an IRP_MN_QUERY_INTERFACE request to its physical device object (PDO) on the VPCI bus. This request must be made from IRQL = PASSIVE_LEVEL. In this request, the driver must set the InterfaceType parameter to GUID_VPCI_INTERFACE_STANDARD.


Minimum supported client

None supported

Minimum supported server

Windows Server 2012


Supported in NDIS 6.30 and later.


Ndis.h (include Ndis.h)



See also




Send comments about this topic to Microsoft

© 2014 Microsoft