DO_DEVICE_INITIALIZING Annotation
Use the __drv_clearDoInit annotation to specify whether the annotated function is expected to clear the DO_DEVICE_INITIALIZING bit in the Flags field of the device object. This annotation has the following syntax:
__drv_clearDoInit(yes|no)
Calling a function that is annotated with __drv_clearDoInit(yes) exempts the calling function from having to clear the DO_DEVICE_INITIALIZING bit.
The annotation should almost always be used in a conditional context when the function returns success, unless the annotation is applied to a function type definition. For example, in the following function type definition for the DRIVER_ADD_DEVICE function class, the annotations specify that the function cannot raise the IRQL and that the function is expected to clear the DO_DEVICE_INITIALIZING bit.
typedef
__drv_maxFunctionIRQL(PASSIVE_LEVEL)
__drv_sameIRQL
__drv_clearDoInit(yes)
__drv_functionClass(DRIVER_ADD_DEVICE)
NTSTATUS
DRIVER_ADD_DEVICE (
__in struct _DRIVER_OBJECT *DriverObject,
__in struct _DEVICE_OBJECT *PhysicalDeviceObject
);
typedef DRIVER_ADD_DEVICE *PDRIVER_ADD_DEVICE;
Send comments about this topic to Microsoft
Build date: 5/3/2011