win32: get_path(): fix undefined behavior
[mplayer.git] / loader / wine / ntdef.h
blobc7061a4c1de907013b406723b331714aa91f752f
1 #ifndef MPLAYER_NTDEF_H
2 #define MPLAYER_NTDEF_H
4 #include "basetsd.h"
5 #include "windef.h"
7 #include "pshpack1.h"
9 #define NTAPI __stdcall
11 #ifndef IN
12 #define IN
13 #endif
15 #ifndef OUT
16 #define OUT
17 #endif
19 #ifndef OPTIONAL
20 #define OPTIONAL
21 #endif
23 #ifndef VOID
24 #define VOID void
25 #endif
27 typedef LONG NTSTATUS;
28 typedef NTSTATUS *PNTSTATUS;
30 typedef short CSHORT;
31 typedef CSHORT *PCSHORT;
33 typedef WCHAR * PWCHAR;
35 /* NT lowlevel Strings (handled by Rtl* functions in NTDLL)
36 * If they are zero terminated, Length does not include the terminating 0.
39 typedef struct STRING {
40 USHORT Length;
41 USHORT MaximumLength;
42 PSTR Buffer;
43 } STRING,*PSTRING,ANSI_STRING,*PANSI_STRING;
45 typedef struct CSTRING {
46 USHORT Length;
47 USHORT MaximumLength;
48 PCSTR Buffer;
49 } CSTRING,*PCSTRING;
51 typedef struct UNICODE_STRING {
52 USHORT Length; /* bytes */
53 USHORT MaximumLength; /* bytes */
54 PWSTR Buffer;
55 } UNICODE_STRING,*PUNICODE_STRING;
58 Objects
61 #define OBJ_INHERIT 0x00000002L
62 #define OBJ_PERMANENT 0x00000010L
63 #define OBJ_EXCLUSIVE 0x00000020L
64 #define OBJ_CASE_INSENSITIVE 0x00000040L
65 #define OBJ_OPENIF 0x00000080L
66 #define OBJ_OPENLINK 0x00000100L
67 #define OBJ_KERNEL_HANDLE 0x00000200L
68 #define OBJ_VALID_ATTRIBUTES 0x000003F2L
70 typedef struct OBJECT_ATTRIBUTES
71 { ULONG Length;
72 HANDLE RootDirectory;
73 PUNICODE_STRING ObjectName;
74 ULONG Attributes;
75 PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
76 PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
77 } OBJECT_ATTRIBUTES;
79 typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES;
81 #define InitializeObjectAttributes(p,n,a,r,s) \
82 { (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
83 (p)->RootDirectory = r; \
84 (p)->Attributes = a; \
85 (p)->ObjectName = n; \
86 (p)->SecurityDescriptor = s; \
87 (p)->SecurityQualityOfService = NULL; \
91 #include "poppack.h"
93 #endif /* MPLAYER_NTDEF_H */