InitializeObjectAttributes - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _PHNT_NTDEF_H
#ifndef _NTDEF_

#define InitializeObjectAttributes(p, n, a, r, s) { \
    (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
    (p)->RootDirectory = r; \
    (p)->Attributes = a; \
    (p)->ObjectName = n; \
    (p)->SecurityDescriptor = s; \
    (p)->SecurityQualityOfService = NULL; \
    }

#endif
#endif

View code on GitHub

Initializes an OBJECT_ATTRIBUTES structure. This macro is documented in Windows Driver Kit.