InitializeObjectAttributes function

The InitializeObjectAttributes macro initializes the opaque OBJECT_ATTRIBUTES structure, which specifies the properties of an object handle to routines that open handles.

Syntax

void InitializeObjectAttributes(
   p,
   n,
   a,
   r,
   s
);

Parameters

p

TBD

n

TBD

a

TBD

r

TBD

s

TBD

Return Value

None

Remarks

InitializeObjectAttributes initializes an OBJECT_ATTRIBUTES structure that specifies the properties of an object handle to be opened. The caller can then pass a pointer to this structure to a routine that actually opens the handle.

Driver routines that run in a process context other than that of the system process must set the OBJ_KERNEL_HANDLE flag for the Attributes parameter. This flag restricts the use of a handle opened for that object to processes running only in kernel mode. Otherwise, the handle can be accessed by the process in whose context the driver is running.

Note that InitializeObjectAttributes always sets the SecurityQualityOfService member of OBJECT_ATTRIBUTES to NULL. Drivers that require a non-NULL value can set SecurityQualityOfService directly.

Requirements

   
Target Platform Desktop
Header wudfwdm.h (include Wdm.h, Ntddk.h, Ntdef.h)

See Also

ExCreateCallback

IoCreateFile

OBJECT_ATTRIBUTES

PsCreateSystemThread

SECURITY_DESCRIPTOR

UNICODE_STRING

ZwCreateDirectoryObject

ZwCreateFile

ZwCreateKey

ZwMakeTemporaryObject

ZwOpenFile

ZwOpenKey

ZwOpenSection

ZwOpenSymbolicLinkObject