Previous Next

NdisImmediateWritePortUshort

This function is obsolete for Windows XP and later operating systems. 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 NdisWritePortUshort instead.

NdisImmediateWritePortUshort writes a USHORT to a given bus-relative I/O port.

VOID
  NdisImmediateWritePortUshort(
    IN NDIS_HANDLE  WrapperConfigurationContext,
    IN ULONG  Port,
    IN USHORT  Data
    );

Parameters

WrapperConfigurationContext
Specifies the handle input to MiniportInitialize.
Port
Specifies the bus-relative I/O port address.
Data
Specifies the caller-supplied USHORT value to write to the I/O port.

Headers

Declared in Ndis.h. Include Ndis.h.

Comments

NdisImmediateWritePortUshort determines how the host accesses the given I/O port, maps the bus-relative port address, and then writes the given USHORT to the device.

A miniport driver can call NdisImmediateWritePortUshort during initialization to write data to a device I/O port when that driver has not yet called NdisMRegisterIoPortRange to obtain mapped device memory ranges. After its call to NdisMRegisterIoPortRange, the driver uses the faster NdisRawXxx functions to communicate with its NIC.

A miniport driver should not call NdisImmediateWritePortUshort in a Plug and Play environment.

Callers of NdisImmediateWritePortUshort run at IRQL = PASSIVE_LEVEL.

See Also

MiniportInitialize, NdisImmediateReadPortUshort, NdisImmediateWritePortUchar, NdisImmediateWritePortUlong, NdisMRegisterIoPortRange, NdisRawWritePortUshort NdisWritePortUshort