source: Daodan/MinGW/include/ntdef.h@ 1075

Last change on this file since 1075 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 1.5 KB
Line 
1#ifndef _NTDEF_H
2#define _NTDEF_H
3#if __GNUC__ >=3
4#pragma GCC system_header
5#endif
6
7#define NTAPI __stdcall
8#define OBJ_INHERIT 2L
9#define OBJ_PERMANENT 16L
10#define OBJ_EXCLUSIVE 32L
11#define OBJ_CASE_INSENSITIVE 64L
12#define OBJ_OPENIF 128L
13#define OBJ_OPENLINK 256L
14#define OBJ_VALID_ATTRIBUTES 498L
15#define InitializeObjectAttributes(p,n,a,r,s) { \
16 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
17 (p)->RootDirectory = (r); \
18 (p)->Attributes = (a); \
19 (p)->ObjectName = (n); \
20 (p)->SecurityDescriptor = (s); \
21 (p)->SecurityQualityOfService = NULL; \
22}
23#ifndef NT_SUCCESS
24#define NT_SUCCESS(x) ((x)>=0)
25#define STATUS_SUCCESS ((NTSTATUS)0)
26#endif
27#if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H)
28typedef LONG NTSTATUS, *PNTSTATUS;
29typedef struct _UNICODE_STRING {
30 USHORT Length;
31 USHORT MaximumLength;
32 PWSTR Buffer;
33} UNICODE_STRING, *PUNICODE_STRING;
34typedef const UNICODE_STRING* PCUNICODE_STRING;
35typedef struct _STRING {
36 USHORT Length;
37 USHORT MaximumLength;
38 PCHAR Buffer;
39} STRING, *PSTRING;
40#endif
41typedef STRING ANSI_STRING;
42typedef PSTRING PANSI_STRING;
43typedef STRING OEM_STRING;
44typedef PSTRING POEM_STRING;
45typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
46typedef enum _SECTION_INHERIT {
47 ViewShare = 1,
48 ViewUnmap = 2
49} SECTION_INHERIT;
50#if !defined(_NTSECAPI_H)
51typedef struct _OBJECT_ATTRIBUTES {
52 ULONG Length;
53 HANDLE RootDirectory;
54 PUNICODE_STRING ObjectName;
55 ULONG Attributes;
56 PVOID SecurityDescriptor;
57 PVOID SecurityQualityOfService;
58} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
59#endif
60#endif /* _NTDEF_H */
Note: See TracBrowser for help on using the repository browser.