]> git.saurik.com Git - wxWidgets.git/blob - utils/Install/inczip/rsxntwin.h
redefined TRUE and FALSE to be of type bool
[wxWidgets.git] / utils / Install / inczip / rsxntwin.h
1 /* rsxntwin.h
2 *
3 * fills some gaps in the rsxnt 1.3 win32 header files (<windows.h>) that are
4 * required for compiling Info-ZIP sources for Win NT / Win 95
5 */
6
7 #ifdef __RSXNT__
8 #if !defined (_RSXNTWIN_H)
9 #define _RSXNTWIN_H
10
11 #ifdef TFUNCT /* TFUNCT is undefined when MSSDK headers are used */
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 #define PASCAL __stdcall
18
19 #define ANYSIZE_ARRAY 1
20
21 #ifndef TIME_ZONE_ID_UNKNOWN
22 # define TIME_ZONE_ID_UNKNOWN 0
23 #endif
24
25 #define FILE_ATTRIBUTE_HIDDEN 0x00000002
26 #define FILE_ATTRIBUTE_SYSTEM 0x00000004
27
28 #define FILE_SHARE_DELETE 0x00000004
29
30 #define FILE_PERSISTENT_ACLS 0x00000008
31
32 #define HFILE_ERROR ((HFILE)-1)
33
34 #define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS
35
36
37 BOOL WINAPI DosDateTimeToFileTime(WORD, WORD, LPFILETIME);
38
39
40 #ifndef SetVolumeLabel
41 #define SetVolumeLabel TFUNCT(SetVolumeLabel)
42 #endif
43 BOOL WINAPI SetVolumeLabel(LPCTSTR, LPCTSTR);
44
45
46 #ifndef GetDriveType
47 #define GetDriveType TFUNCT(GetDriveType)
48 #endif
49 DWORD GetDriveType(LPCTSTR);
50
51 #define DRIVE_UNKNOWN 0
52 #define DRIVE_REMOVABLE 2
53 #define DRIVE_FIXED 3
54 #define DRIVE_REMOTE 4
55 #define DRIVE_CDROM 5
56 #define DRIVE_RAMDISK 6
57
58 #ifndef SearchPath
59 #define SearchPath TFUNCT(SearchPath)
60 #endif
61 BOOL WINAPI SearchPath(LPCTSTR, LPCTSTR, LPCTSTR, UINT, LPTSTR, LPTSTR *);
62
63 #define ERROR_SUCCESS 0
64 #define ERROR_INSUFFICIENT_BUFFER 122
65
66 LONG WINAPI InterlockedExchange(LPLONG, LONG);
67
68 #define ACCESS_SYSTEM_SECURITY 0x01000000L
69
70 typedef PVOID PSECURITY_DESCRIPTOR;
71 typedef PVOID PSID;
72 typedef struct _ACL {
73 BYTE AclRevision;
74 BYTE Sbz1;
75 WORD AclSize;
76 WORD AceCount;
77 WORD Sbz2;
78 } ACL;
79 typedef ACL *PACL;
80
81 typedef struct _LUID {
82 DWORD LowPart;
83 LONG HighPart;
84 } LUID, *PLUID;
85
86 typedef struct _LUID_AND_ATTRIBUTES {
87 LUID Luid;
88 DWORD Attributes;
89 } LUID_AND_ATTRIBUTES, * PLUID_AND_ATTRIBUTES;
90
91 typedef struct _TOKEN_PRIVILEGES {
92 DWORD PrivilegeCount;
93 LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
94 } TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
95
96 #define TOKEN_QUERY 0x0008
97 #define TOKEN_ADJUST_PRIVILEGES 0x0020
98
99 BOOL WINAPI OpenProcessToken(HANDLE, DWORD, PHANDLE);
100 BOOL WINAPI AdjustTokenPrivileges(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD,
101 PTOKEN_PRIVILEGES, PDWORD);
102
103 #ifndef LookupPrivilegeValue
104 #define LookupPrivilegeValue TFUNCT(LookupPrivilegeValue)
105 #endif
106 BOOL WINAPI LookupPrivilegeValue(LPCTSTR, LPCTSTR, PLUID);
107
108 typedef DWORD SECURITY_INFORMATION, *PSECURITY_INFORMATION;
109 #define OWNER_SECURITY_INFORMATION 0x00000001L
110 #define GROUP_SECURITY_INFORMATION 0x00000002L
111 #define DACL_SECURITY_INFORMATION 0x00000004L
112 #define SACL_SECURITY_INFORMATION 0x00000008L
113
114 typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
115 #define SE_DACL_PRESENT 0x0004
116 #define SE_SACL_PRESENT 0x0010
117
118 #define SE_PRIVILEGE_ENABLED 0x00000002L
119
120 #define SE_SECURITY_NAME TEXT("SeSecurityPrivilege")
121 #define SE_BACKUP_NAME TEXT("SeBackupPrivilege")
122 #define SE_RESTORE_NAME TEXT("SeRestorePrivilege")
123
124 BOOL WINAPI GetKernelObjectSecurity(HANDLE, SECURITY_INFORMATION,
125 PSECURITY_DESCRIPTOR, DWORD, LPDWORD);
126 BOOL WINAPI SetKernelObjectSecurity(HANDLE, SECURITY_INFORMATION,
127 PSECURITY_DESCRIPTOR);
128 BOOL WINAPI IsValidSid(PSID);
129 BOOL WINAPI IsValidAcl(PACL);
130 BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR);
131 BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
132 DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR);
133 BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,
134 PSECURITY_DESCRIPTOR_CONTROL, LPDWORD);
135 BOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,
136 SECURITY_DESCRIPTOR_CONTROL, SECURITY_DESCRIPTOR_CONTROL);
137 BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,
138 LPBOOL, PACL *, LPBOOL);
139 BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR, BOOL, PACL, BOOL);
140 BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,
141 LPBOOL, PACL *, LPBOOL);
142 BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR, BOOL, PACL, BOOL);
143 BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR, PSID *, LPBOOL);
144 BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR, PSID, BOOL);
145 BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR, PSID *, LPBOOL);
146 BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR, PSID, BOOL);
147 VOID WINAPI InitializeCriticalSection();
148
149 #ifdef __cplusplus
150 }
151 #endif
152
153 #endif /* TFUNCT */
154 #endif /* !defined (_RSXNTWIN_H) */
155 #endif /* __RSXNT__ */