WdfDeviceSetSpecialFileSupport method

[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 [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.

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

EvtDriverDeviceAdd
WDF_SPECIAL_FILE_TYPE

 

 

Send comments about this topic to Microsoft

Show: