IWDFIoRequest::GetOutputMemory method

The GetOutputMemory method retrieves the memory object that represents the output buffer for an I/O request.

Syntax


void GetOutputMemory(
  [out] IWDFMemory **ppWdfMemory
);

Parameters

ppWdfMemory [out]

A pointer to a variable that receives a pointer to the reference-counted IWDFMemory interface for the memory object. Note that returning NULL is valid; in this situation, no output memory is associated with the I/O request.

Return value

None

Remarks

Drivers that use the buffered I/O access method can call GetOutputMemory to obtain an I/O request's output buffer.

Before a driver completes an I/O request, the driver must call the IWDFMemory::Release method for the memory object. The underlying memory object is freed when the request is completed.

The output buffer that is associated with the I/O request contains information (for example, data from a disk) that the driver provides to the originator of the request. The driver can call GetOutputMemory to obtain the output buffer for a read request or a device I/O control request, but not for a write request (because write requests do not provide output data). To access the output buffer, the driver must call the IWDFMemory::GetDataBuffer method.

UMDF creates an I/O request's memory objects when it receives the I/O request, before it adds the I/O request to a driver's I/O queue. If UMDF cannot allocate memory for the memory objects, it completes the I/O request with a failure return status and does not deliver the I/O request to the driver.

For more information about accessing an I/O request's data buffers, see Accessing Data Buffers in UMDF-Based Drivers.

Examples

For a code example of how to use the GetOutputMemory method, see IWDFIoQueue::RetrieveNextRequest.

Requirements

Target platform

Desktop

End of support

Unavailable in UMDF 2.0 and later.

Minimum UMDF version

1.5

Header

Wudfddi.h (include Wudfddi.h)

DLL

WUDFx.dll

See also

IWDFIoRequest
IWDFIoQueue::RetrieveNextRequest
IWDFMemory
IWDFMemory::GetDataBuffer

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft