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
8 #if !defined (_RSXNTWIN_H)
11 #ifdef TFUNCT /* TFUNCT is undefined when MSSDK headers are used */
17 #define PASCAL __stdcall
19 #define ANYSIZE_ARRAY 1
21 #ifndef TIME_ZONE_ID_UNKNOWN
22 # define TIME_ZONE_ID_UNKNOWN 0
25 #define FILE_ATTRIBUTE_HIDDEN 0x00000002
26 #define FILE_ATTRIBUTE_SYSTEM 0x00000004
28 #define FILE_SHARE_DELETE 0x00000004
30 #define FILE_PERSISTENT_ACLS 0x00000008
32 #define HFILE_ERROR ((HFILE)-1)
34 #define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS
37 BOOL WINAPI
DosDateTimeToFileTime(WORD
, WORD
, LPFILETIME
);
40 #ifndef SetVolumeLabel
41 #define SetVolumeLabel TFUNCT(SetVolumeLabel)
43 BOOL WINAPI
SetVolumeLabel(LPCTSTR
, LPCTSTR
);
47 #define GetDriveType TFUNCT(GetDriveType)
49 DWORD
GetDriveType(LPCTSTR
);
51 #define DRIVE_UNKNOWN 0
52 #define DRIVE_REMOVABLE 2
54 #define DRIVE_REMOTE 4
56 #define DRIVE_RAMDISK 6
59 #define SearchPath TFUNCT(SearchPath)
61 BOOL WINAPI
SearchPath(LPCTSTR
, LPCTSTR
, LPCTSTR
, UINT
, LPTSTR
, LPTSTR
*);
63 #define ERROR_SUCCESS 0
64 #define ERROR_INSUFFICIENT_BUFFER 122
66 LONG WINAPI
InterlockedExchange(LPLONG
, LONG
);
68 #define ACCESS_SYSTEM_SECURITY 0x01000000L
70 typedef PVOID PSECURITY_DESCRIPTOR
;
81 typedef struct _LUID
{
86 typedef struct _LUID_AND_ATTRIBUTES
{
89 } LUID_AND_ATTRIBUTES
, * PLUID_AND_ATTRIBUTES
;
91 typedef struct _TOKEN_PRIVILEGES
{
93 LUID_AND_ATTRIBUTES Privileges
[ANYSIZE_ARRAY
];
94 } TOKEN_PRIVILEGES
, *PTOKEN_PRIVILEGES
;
96 #define TOKEN_QUERY 0x0008
97 #define TOKEN_ADJUST_PRIVILEGES 0x0020
99 BOOL WINAPI
OpenProcessToken(HANDLE
, DWORD
, PHANDLE
);
100 BOOL WINAPI
AdjustTokenPrivileges(HANDLE
, BOOL
, PTOKEN_PRIVILEGES
, DWORD
,
101 PTOKEN_PRIVILEGES
, PDWORD
);
103 #ifndef LookupPrivilegeValue
104 #define LookupPrivilegeValue TFUNCT(LookupPrivilegeValue)
106 BOOL WINAPI
LookupPrivilegeValue(LPCTSTR
, LPCTSTR
, PLUID
);
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
114 typedef WORD SECURITY_DESCRIPTOR_CONTROL
, *PSECURITY_DESCRIPTOR_CONTROL
;
115 #define SE_DACL_PRESENT 0x0004
116 #define SE_SACL_PRESENT 0x0010
118 #define SE_PRIVILEGE_ENABLED 0x00000002L
120 #define SE_SECURITY_NAME TEXT("SeSecurityPrivilege")
121 #define SE_BACKUP_NAME TEXT("SeBackupPrivilege")
122 #define SE_RESTORE_NAME TEXT("SeRestorePrivilege")
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();
154 #endif /* !defined (_RSXNTWIN_H) */
155 #endif /* __RSXNT__ */