WdfDeviceSetSpecialFileSupport function (wdfdevice.h)

[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

[in] Device

A handle to a framework device object.

[in] FileType

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

[in] 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

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

Requirements

Requirement Value
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(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf)

See also

EvtDriverDeviceAdd

WDF_SPECIAL_FILE_TYPE