EVT_WDF_DEVICE_FILE_CREATE - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfdevice.h

EVT_WDF_DEVICE_FILE_CREATE EvtWdfDeviceFileCreate;

VOID EvtWdfDeviceFileCreate(
  [in] WDFDEVICE Device,
  [in] WDFREQUEST Request,
  [in] WDFFILEOBJECT FileObject
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-wdfdevice-evt_wdf_device_file_create)

EVT_WDF_DEVICE_FILE_CREATE callback function

Description

[Applies to KMDF and UMDF]

A driver's EvtDeviceFileCreate callback function handles operations that must be performed when an application requests access to a device.

Parameters

Device [in]

A handle to a framework device object.

Request [in]

A handle to a framework request object that represents a file creation request.

FileObject [in]

A handle to a framework file object that describes a file that is being opened for the specified request. This parameter is NULL if the driver has specified WdfFileObjectNotRequired for the FileObjectClass member of the WDF_FILEOBJECT_CONFIG structure.

Remarks

The framework calls a driver's EvtDeviceFileCreate callback function when a user application or another driver opens the device to perform an I/O operation, such as reading or writing a file.

The driver can pass the Request handle to WdfRequestGetParameters to retrieve parameters that are associated with the file creation request. The parameters are stored in the Parameters.Create member of the WDF_REQUEST_PARAMETERS structure.

This callback function is called synchronously, in the context of the thread that opens the device.

To register an EvtDeviceFileCreate callback function, the driver must call the WdfDeviceInitSetFileObjectConfig method.

The driver must either complete the request or send it with WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET.

Alternatively, the driver can receive create requests in a queue. For more info, see WdfDeviceConfigureRequestDispatching.

For more information about framework file objects and the EvtDeviceFileCreate callback function, see Framework File Objects.

See also

WDF_FILEOBJECT_CONFIG