Framework Object Creation Errors

When a driver's attempt to create a framework object fails, the object creation method returns an NTSTATUS value that indicates the failure type.

If the driver specifies invalid information in a WDF_OBJECT_ATTRIBUTES structure, the framework can return:

STATUS_WDF_OBJECT_ATTRIBUTES_INVALID

The driver specified an object context name, but the context size is zero.

The driver specified a context size override value, but it did not provide a WDF_OBJECT_CONTEXT_TYPE_INFO structure.

The driver specified a ContextSizeOverride value in WDF_OBJECT_ATTRIBUTES that is less than the ContextSize member of the WDF_OBJECT_CONTEXT_TYPE_INFO structure.

The driver specified an ExecutionLevel value in WDF_OBJECT_ATTRIBUTES that is not within the valid range of values.

The driver specified an SynchronizationScope value in WDF_OBJECT_ATTRIBUTES that is not within the valid range of values.

STATUS_WDF_PARENT_ASSIGNMENT_NOT_ALLOWED

The driver attempted to assign a parent to the object, but the framework does not allow drivers to assign parents to the object type.

STATUS_WDF_PARENT_ALREADY_ASSIGNED

The driver attempted to assign a parent to an object, but a parent is already assigned to the object.

STATUS_WDF_PARENT_IS_SELF

The driver attempted to make an object its own parent.

STATUS_WDF_SYNCHRONIZATION_SCOPE_INVALID

The driver specified a WDF_SYNCHRONIZATION_SCOPE-typed value that is invalid for the object type.

STATUS_WDF_EXECUTION_LEVEL_INVALID

The driver specified a WDF_EXECUTION_LEVEL-typed value that is invalid for the object type.

If the Size member of any framework-defined structure does not match the structure's actual size, the framework can return STATUS_INFO_LENGTH_MISMATCH.

If the framework cannot allocate memory for the new object, it can return STATUS_INSUFFICIENT_RESOURCES.

Individual object creation methods might also return additional NTSTATUS values. For more information about each creation method's additional return values, see the method's reference page.

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft