// wdfrequest.h
typedef enum _WDF_REQUEST_TYPE {
WdfRequestTypeCreate = 0x0,
WdfRequestTypeCreateNamedPipe = 0x1,
WdfRequestTypeClose = 0x2,
WdfRequestTypeRead = 0x3,
WdfRequestTypeWrite = 0x4,
WdfRequestTypeQueryInformation = 0x5,
WdfRequestTypeSetInformation = 0x6,
WdfRequestTypeQueryEA = 0x7,
WdfRequestTypeSetEA = 0x8,
WdfRequestTypeFlushBuffers = 0x9,
WdfRequestTypeQueryVolumeInformation = 0xa,
WdfRequestTypeSetVolumeInformation = 0xb,
WdfRequestTypeDirectoryControl = 0xc,
WdfRequestTypeFileSystemControl = 0xd,
WdfRequestTypeDeviceControl = 0xe,
WdfRequestTypeDeviceControlInternal = 0xf,
WdfRequestTypeShutdown = 0x10,
WdfRequestTypeLockControl = 0x11,
WdfRequestTypeCleanup = 0x12,
WdfRequestTypeCreateMailSlot = 0x13,
WdfRequestTypeQuerySecurity = 0x14,
WdfRequestTypeSetSecurity = 0x15,
WdfRequestTypePower = 0x16,
WdfRequestTypeSystemControl = 0x17,
WdfRequestTypeDeviceChange = 0x18,
WdfRequestTypeQueryQuota = 0x19,
WdfRequestTypeSetQuota = 0x1A,
WdfRequestTypePnp = 0x1B,
WdfRequestTypeOther = 0x1C,
WdfRequestTypeUsb = 0x40,
WdfRequestTypeNoFormat = 0xFF,
WdfRequestTypeMax
} WDF_REQUEST_TYPE;
View the official Windows Driver Kit DDI reference// wudfddi_types.h
typedef enum _WDF_REQUEST_TYPE {
WdfRequestUndefined,
WdfRequestCreate,
WdfRequestCleanup,
WdfRequestRead,
WdfRequestWrite,
WdfRequestDeviceIoControl,
WdfRequestClose,
WdfRequestUsb,
WdfRequestOther,
WdfRequestInternalIoctl,
WdfRequestTypeNoFormat,
WdfRequestFlushBuffers,
WdfRequestQueryInformation,
WdfRequestSetInformation,
WdfRequestMaximum
} WDF_REQUEST_TYPE, *PWDF_REQUEST_TYPE;
View the official Windows Driver Kit DDI referenceNo description available.
[Applies to KMDF and UMDF]
The WDF_REQUEST_TYPE enumeration type identifies types of requests that a framework request object might contain.
WdfRequestTypeCreate:0x0The request object represents an IRP_MJ_CREATE request. The framework delivers this type of request to a driver's EvtDeviceFileCreate callback function.
WdfRequestTypeCreateNamedPipe:0x1The request object represents an IRP_MJ_CREATE_NAMED_PIPE request. The framework does not handle this type of request.
WdfRequestTypeClose:0x2The request object represents an IRP_MJ_CLOSE request. The framework delivers this type of request to a driver's EvtFileClose callback function.
WdfRequestTypeRead:0x3The request object represents an IRP_MJ_READ request. The framework delivers this type of request to a driver's request handler.
WdfRequestTypeWrite:0x4The request object represents an IRP_MJ_WRITE request. The framework delivers this type of request to a driver's request handler.
WdfRequestTypeQueryInformation:0x5The request object represents an IRP_MJ_QUERY_INFORMATION request. The framework does not handle this type of request.
WdfRequestTypeSetInformation:0x6The request object represents an IRP_MJ_SET_INFORMATION request. The framework does not handle this type of request.
WdfRequestTypeQueryEA:0x7The request object represents an IRP_MJ_QUERY_EA request. The framework does not handle this type of request.
WdfRequestTypeSetEA:0x8The request object represents an IRP_MJ_SET_EA request. The framework does not handle this type of request.
WdfRequestTypeFlushBuffers:0x9The request object represents an IRP_MJ_FLUSH_BUFFERS request. The framework does not handle this type of request.
WdfRequestTypeQueryVolumeInformation:0xaThe request object represents an IRP_MJ_QUERY_VOLUME_INFORMATION request. The framework does not handle this type of request.
WdfRequestTypeSetVolumeInformation:0xbThe request object represents an IRP_MJ_SET_VOLUME_INFORMATION request. The framework does not handle this type of request.
WdfRequestTypeDirectoryControl:0xcThe request object represents an IRP_MJ_DIRECTORY_CONTROL request. The framework does not handle this type of request.
WdfRequestTypeFileSystemControl:0xdThe request object represents an IRP_MJ_FILE_SYSTEM_CONTROL request. The framework does not handle this type of request.
WdfRequestTypeDeviceControl:0xeThe request object represents an IRP_MJ_DEVICE_CONTROL request. The framework delivers this type of request to a driver's request handler.
WdfRequestTypeDeviceControlInternal:0xfThe request object represents an IRP_MJ_INTERNAL_DEVICE_CONTROL request. The framework delivers this type of request to a driver's request handler.
WdfRequestTypeShutdown:0x10The request object represents an IRP_MJ_SHUTDOWN request. The framework handles this type of request for the driver, but the framework also calls the driver's EvtDeviceShutdownNotification callback function, if it exists.
WdfRequestTypeLockControl:0x11The request object represents an IRP_MJ_LOCK_CONTROL request. The framework does not handle this type of request.
WdfRequestTypeCleanup:0x12The request object represents an IRP_MJ_CLEANUP request. The framework delivers this type of request to a driver's EvtFileCleanup callback function.
WdfRequestTypeCreateMailSlot:0x13The request object represents an IRP_MJ_CREATE_MAILSLOT request. The framework does not handle this type of request.
WdfRequestTypeQuerySecurity:0x14The request object represents an IRP_MJ_QUERY_SECURITY request. The framework does not handle this type of request.
WdfRequestTypeSetSecurity:0x15The request object represents an IRP_MJ_SET_SECURITY request. The framework does not handle this type of request.
WdfRequestTypePower:0x16The request object represents an IRP_MJ_POWER request. The framework handles this type of request for the driver, but the framework also calls the driver's general, FDO, and PDO callback functions for Plug and Play (PnP) and power management, if the callback functions exist.
WdfRequestTypeSystemControl:0x17The request object represents an IRP_MJ_SYSTEM_CONTROL request. The framework handles this type of request for the driver, if the driver supports Windows Management Instrumentation (WMI).
WdfRequestTypeDeviceChange:0x18The request object represents an IRP_MJ_DEVICE_CHANGE request. The framework does not handle this type of request.
WdfRequestTypeQueryQuota:0x19The request object represents an IRP_MJ_QUERY_QUOTA request. The framework does not handle this type of request.
WdfRequestTypeSetQuota:0x1AThe request object represents an IRP_MJ_SET_QUOTA request. The framework does not handle this type of request.
WdfRequestTypePnp:0x1BThe request object represents an IRP_MJ_PNP request. The framework handles this type of request for the driver, but the framework also calls the driver's general, FDO, and PDO callback functions for PnP and power management, if the callback functions exist.
WdfRequestTypeOther:0x1CA driver receives this request type in its CompletionRoutine event callback function when requests formatted with WdfIoTargetFormatRequestForInternalIoctlOthers are completed.
WdfRequestTypeUsb:0x40The target device is a USB device. (This value is used only in WDF_REQUEST_COMPLETION_PARAMS structures.)
WdfRequestTypeNoFormat:0xFFThe request object's type has not been specified.
WdfRequestTypeMaxThe maximum value that has been assigned to a valid IRP major function code.
The WDF_REQUEST_TYPE enumeration type is used in the WDF_REQUEST_PARAMETERS and WDF_REQUEST_COMPLETION_PARAMS structures.
For information about how a framework-based driver can handle request types that the framework does not support, see Handling an IRP that the Framework Does Not Support.
For the UMDF version of this enumeration, see WDF_REQUEST_TYPE (UMDF).
[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 WDF_REQUEST_TYPE enumeration identifies the types of I/O requests that a UMDF request object can represent.
WdfRequestUndefinedThe type of the request object is undefined.
WdfRequestCreateThe request object represents a file creation request. The driver receives this type of request object when an application opens a device by calling the Microsoft Win32 CreateFile function. The framework delivers this type of request, along with a newly created file object (IWDFFile), to the driver's IQueueCallbackCreate::OnCreateFile callback function. The new file object represents the HANDLE-typed file handle that the Win32 CreateFile returns.
WdfRequestCleanupThe request object represents a file cleanup request. The driver receives this type of request object after an application's call to the Win32 CloseHandle function closes the last handle to a file object, but possibly before all of the file's outstanding I/O requests have been completed or canceled. The framework delivers this type of request to the driver's IFileCallbackCleanup::OnCleanupFile callback function. (Also see WdfRequestClose.)
WdfRequestReadThe request object represents a read request. This driver receives this type of I/O request when an application calls the Win32 ReadFile or ReadFileEx function. The framework delivers this type of request to the driver's IQueueCallbackRead::OnRead callback function.
WdfRequestWriteThe request object represents a write request. This driver receives this type of I/O request when an application calls the Win32 WriteFile or WriteFileEx function. The framework delivers this type of request to the driver's IQueueCallbackWrite::OnWrite callback function.
WdfRequestDeviceIoControlThe request object represents a device I/O control request. This driver receives this type of I/O request when an application calls the Win32 DeviceIoControl function. The framework delivers this type of request to the driver's IQueueCallbackDeviceIoControl::OnDeviceIoControl callback function.
WdfRequestCloseThe request object represents a file close request. The driver receives this type of request object after an application's call to the Win32 CloseHandle function closes the last handle to a file object, and after all of the file's outstanding I/O requests have been completed or canceled. The framework delivers this type of request to the driver's IFileCallbackClose::OnCloseFile callback function. (Also see WdfRequestCleanup.)
WdfRequestUsbThe request object was sent to a USB port. The IWDFRequestCompletionParams::GetCompletedRequestType method can return this value.
WdfRequestOtherThis value is reserved for internal use only.
WdfRequestInternalIoctlThis value is reserved for internal use only.
WdfRequestTypeNoFormatThe request object's type has not been specified.
WdfRequestFlushBuffersThe request object represents a request to flush cached buffers. The framework delivers this type of request to the driver's IQueueCallbackDefaultIoHandler::OnDefaultIoHandler callback function.
WdfRequestQueryInformationThe request object represents a request to obtain information about a file. The framework delivers this type of request to the driver's IQueueCallbackDefaultIoHandler::OnDefaultIoHandler callback function.
WdfRequestSetInformationThe request object represents a request to set information about a file. The framework delivers this type of request to the driver's IQueueCallbackDefaultIoHandler::OnDefaultIoHandler callback function.
WdfRequestMaximumThe maximum value for the enumeration is exceeded.
The WDF_REQUEST_TYPE enumeration is used as an input parameter of IWDFDevice::ConfigureRequestDispatching and IWDFIoQueue::ConfigureRequestDispatching. It is also used for the return value of IWDFIoRequest::GetType and IWDFRequestCompletionParams::GetCompletedRequestType.
For the KMDF version of this enumeration, see WDF_REQUEST_TYPE.
IFileCallbackCleanup::OnCleanupFile
IFileCallbackClose::OnCloseFile
IQueueCallbackCreate::OnCreateFile
IQueueCallbackDeviceIoControl::OnDeviceIoControl