SerCxRetrieveTransmitMdl function (sercx.h)

The SerCxRetrieveTransmitMdl method retrieves the MDL that describes the buffer that contains the next block of output data to be transmitted.

Syntax

NTSTATUS SerCxRetrieveTransmitMdl(
  [in]  WDFDEVICE Device,
  [out] PMDL      *Mdl
);

Parameters

[in] Device

A WDFDEVICE handle to the framework device object that represents the serial controller.

[out] Mdl

A pointer to a location into which the method writes a pointer to the MDL.

Return value

SerCxRetrieveTransmitMdl returns STATUS_SUCCESS if the call is successful. Possible return values include the following error codes.

Return code Description
STATUS_INVALID_DEVICE_REQUEST
This value is returned if one of the following occurs:
  • There is no outstanding transmit request to get an MDL from.
  • The current number of bytes transmitted (as reported by the SerCxProgressTransmit method) does not equal zero.
  • The buffer has already been retrieved (and the corresponding call to the SerCxProgressTransmit method has not yet occurred).
  • The MDL has already been retrieved (and the corresponding call to the SerCxProgressTransmit method has not yet occurred).

Remarks

The serial controller driver calls this function to obtain an MDL to use for the current transmit (write) operation. The MDL describes the buffer memory from which the driver is to obtain the data to be transmitted. The driver is the exclusive owner of this MDL until it calls the SerCxProgressTransmit method, after which the MDL pointer is invalid and the driver must no longer try to access either the MDL or the buffer memory that the MDL describes.

For more information about MDLs, see Using MDLs.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 8.
Target Platform Universal
Header sercx.h
IRQL <= DISPATCH_LEVEL

See also

SerCxProgressTransmit