IWDFIoRequest::GetType method

The GetType method retrieves the type of operation that a request contains.

Syntax


WDF_REQUEST_TYPE  GetType();

Parameters

This method has no parameters.

Return value

GetType returns a WDF_REQUEST_TYPE-typed value that identifies the request type and why the request is sent to the driver.

Examples

The following code example processes a request according to its operation type by first comparing the request object's type with a known type.


void
CMyQueue::OnCompletion(
    IWDFIoRequest*                 FxRequest,
    IWDFIoTarget*                  FxIoTarget,
    IWDFRequestCompletionParams*   CompletionParams,
    PVOID                          Context
    )
{
    UNREFERENCED_PARAMETER(FxIoTarget);
    UNREFERENCED_PARAMETER(Context);

    //
    // If this request is a read request, invert the bits read 
    // because they were inverted during write so that the
    // application would read the identical data that it wrote.
    //

    if (WdfRequestRead == FxRequest->GetType()) {
        HandleReadRequestCompletion(
            FxRequest, 
            CompletionParams
            );
    }
    else {
        //
        // Otherwise, complete the request object with the 
        // identical parameters that the lower request was 
        // completed with.
        //
 
        FxRequest->CompleteWithInformation(
            CompletionParams->GetCompletionStatus(),
            CompletionParams->GetInformation()
            );    
    }
}

Requirements

Target platform

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
WDF_REQUEST_TYPE

 

 

Send comments about this topic to Microsoft

Show: