// wdfdevice.h
VOID WdfDeviceSetSpecialFileSupport(
[in] WDFDEVICE Device,
[in] WDF_SPECIAL_FILE_TYPE FileType,
[in] BOOLEAN FileTypeIsSupported
);
View the official Windows Driver Kit DDI referenceNo description available.
[Applies to KMDF only]
The WdfDeviceSetSpecialFileSupport method enables or disables a function driver's support for special files, for the specified device.
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.
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.
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
);