WdfDeviceSetSpecialFileSupport - NtDoc

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

VOID WdfDeviceSetSpecialFileSupport(
  [in] WDFDEVICE             Device,
  [in] WDF_SPECIAL_FILE_TYPE FileType,
  [in] BOOLEAN               FileTypeIsSupported
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfdevice-wdfdevicesetspecialfilesupport)

WdfDeviceSetSpecialFileSupport function

Description

[Applies to KMDF only]

The WdfDeviceSetSpecialFileSupport method enables or disables a function driver's support for special files, for the specified device.

Parameters

Device [in]

A handle to a framework device object.

FileType [in]

A WDF_SPECIAL_FILE_TYPE-typed enumerator that identifies the type of special file that the driver supports.

FileTypeIsSupported [in]

Supplies a Boolean value which, if TRUE, enables support for the special file type and, if FALSE, disables support the special file type.

Remarks

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

A function driver typically calls WdfDeviceSetSpecialFileSupport from within its EvtDriverDeviceAdd callback function.

Each driver's support for special files is initially disabled until the driver calls WdfDeviceSetSpecialFileSupport.

For more information, see Supporting Special Files.

Examples

The following code example enables support for paging, hibernation, and dump files on a device.

WdfDeviceSetSpecialFileSupport(
                               device,
                               WdfSpecialFilePaging,
                               TRUE
                               );
WdfDeviceSetSpecialFileSupport(
                               device,
                               WdfSpecialFileHibernation,
                               TRUE
                               );
WdfDeviceSetSpecialFileSupport(
                               device,
                               WdfSpecialFileDump,
                               TRUE
                               );

See also

EvtDriverDeviceAdd

WDF_SPECIAL_FILE_TYPE