IWDFIoRequest::GetInputMemory method (wudfddi.h)

[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]

The GetInputMemory method retrieves the memory object that represents the input buffer in an I/O request.

Syntax

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

Parameters

[out] ppWdfMemory

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 input memory is associated with the I/O request.

Return value

None

Remarks

Drivers that use the buffered I/O access method can call GetInputMemory to obtain an I/O request's input 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 input buffer that is associated with the I/O request contains information (for example, data to be written to a disk) that the originator of the request supplied. The driver can call GetInputMemory to obtain the input buffer for a write request or a device I/O control request, but not for a read request (because read requests do not provide input data). To access the input 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 GetInputMemory method, see IWDFIoRequest::Complete.

Requirements

Requirement Value
End of support Unavailable in UMDF 2.0 and later.
Target Platform Desktop
Minimum UMDF version 1.5
Header wudfddi.h (include Wudfddi.h)
DLL WUDFx.dll

See also

IWDFIoRequest

IWDFIoRequest::Complete

IWDFMemory

IWDFMemory::GetDataBuffer