WdfDeviceSetSpecialFileSupport function

[Applies to KMDF only]

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

Syntax

VOID WdfDeviceSetSpecialFileSupport(
  _In_ WDFDEVICE             Device,
  _In_ WDF_SPECIAL_FILE_TYPE FileType,
  _In_ BOOLEAN               FileTypeIsSupported
);

Parameters

Device

A handle to a framework device object.

FileType

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

FileTypeIsSupported

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

Return Value

None.

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

Remarks

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
                               );

Requirements

   
Target Platform Universal
Minimum KMDF version 1.0
Header wdfdevice.h (include Wdf.h)
Library Wdf01000.sys (see Framework Library Versioning.)
IRQL "<=DISPATCH_LEVEL"
DDI compliance rules DriverCreate, KmdfIrql, KmdfIrql2

See Also

WDF_SPECIAL_FILE_TYPE

EvtDriverDeviceAdd

Send comments about this topic to Microsoft