EvtRequestImpersonate
WdfRequestGetEffectiveIoType method
WdfRequestGetRequestorProcessId method
WdfRequestGetUserModeInitiatedIo method
WdfRequestImpersonate method
WdfRequestIsFromUserModeDriver method
WdfRequestRetrieveActivityId method
WdfRequestSetActivityId method
WdfRequestSetUserModeDriverInitiatedIo method
展開 最小化

WdfRequestSetInformation メソッド

The WdfRequestSetInformation method sets completion status information for a specified I/O request.

構文

VOID WdfRequestSetInformation(
  [in]  WDFREQUEST Request,
  [in]  ULONG_PTR Information
);

パラメーター

Request [in]

A handle to a framework request object.

Information [in]

Driver-defined completion status information for the request.

戻り値

None.

A bug check occurs if the driver supplies an invalid object handle.

解説

Framework-based drivers use the WdfRequestSetInformation method to supply driver-specific information that is associated with the completion of an I/O request, such as the number of bytes transferred. Other drivers can obtain this information by calling WdfRequestGetInformation.

Drivers can also specify completion status information by calling WdfRequestCompleteWithInformation.

For more information about WdfRequestSetInformation, see Completing I/O Requests.

The following code example sets request completion information that is based on the value of the I/O control code that an EvtIoDeviceControl callback function receives.

VOID
MyEvtIoDeviceControl(
    IN WDFQUEUE  Queue,
    IN WDFREQUEST  Request,
    IN size_t  OutputBufferLength,
    IN size_t  InputBufferLength,
    IN ULONG  IoControlCode
    )
{
    switch (IoControlCode) {
      case MY_IOCTL_CODE_1:
            WdfRequestSetInformation(
                                     Request,
                                     VALUE_1
                                     );
            break;
            status = STATUS_SUCCESS;
      case MY_IOCTL_CODE_2:
            WdfRequestSetInformation(
                                     Request,
                                     VALUE_2
                                     );
            break;
            status = STATUS_SUCCESS;
      case MY_IOCTL_CODE_3:
            WdfRequestSetInformation(
                                     Request,
                                     VALUE_3
                                     );
            status = STATUS_SUCCESS;
            break;
      default:
        status = STATUS_INVALID_DEVICE_REQUEST;
        break;
    }
    WdfRequestComplete(
                       Request,
                       status
                       );
}

要件

バージョン

Available in version 1.0 and later versions of KMDF.

ヘッダー

Wdfrequest.h (includeWdf.h)

ライブラリ

Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)

IRQL

<=DISPATCH_LEVEL

参照

WdfRequestCompleteWithInformation
WdfRequestGetInformation

 

 

コミュニティの追加

追加
表示:
© 2015 Microsoft