2 * Windows API header module
4 * Translated from MinGW Windows headers
6 * Authors: Stewart Gordon
7 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
8 * Source: $(DRUNTIMESRC src/core/sys/windows/_ntdef.d)
10 module core.sys.windows.ntdef;
13 private import core.sys.windows.basetsd, core.sys.windows.subauth, core.sys.windows.windef, core.sys.windows.winnt;
17 OBJ_PERMANENT = 0x0010,
18 OBJ_EXCLUSIVE = 0x0020,
19 OBJ_CASE_INSENSITIVE = 0x0040,
21 OBJ_OPENLINK = 0x0100,
22 OBJ_VALID_ATTRIBUTES = 0x01F2;
24 void InitializeObjectAttributes(OBJECT_ATTRIBUTES* p, UNICODE_STRING* n,
25 uint a, HANDLE r, void* s) {
27 Length = OBJECT_ATTRIBUTES.sizeof;
31 SecurityDescriptor = s;
32 SecurityQualityOfService = null;
36 bool NT_SUCCESS(int x) { return x >= 0; }
38 /* In MinGW, NTSTATUS, UNICODE_STRING, STRING and their associated pointer
39 * type aliases are defined in ntdef.h, ntsecapi.h and subauth.h, each of
40 * which checks that none of the others is already included.
45 struct UNICODE_STRING {
50 alias UNICODE_STRING* PUNICODE_STRING;
51 alias const(UNICODE_STRING)* PCUNICODE_STRING;
58 alias STRING ANSI_STRING, OEM_STRING;
59 alias STRING* PSTRING, PANSI_STRING, POEM_STRING;
61 alias LARGE_INTEGER PHYSICAL_ADDRESS;
62 alias LARGE_INTEGER* PPHYSICAL_ADDRESS;
64 enum SECTION_INHERIT {
69 /* In MinGW, this is defined in ntdef.h and ntsecapi.h, each of which checks
70 * that the other isn't already included.
72 struct OBJECT_ATTRIBUTES {
73 ULONG Length = OBJECT_ATTRIBUTES.sizeof;
75 PUNICODE_STRING ObjectName;
77 PVOID SecurityDescriptor;
78 PVOID SecurityQualityOfService;
80 alias OBJECT_ATTRIBUTES* POBJECT_ATTRIBUTES;