7be8db3aa878a2c81a605b2bfe7e0a9c6f181fb1
[reactos.git] / reactos / include / base.h
1 /*
2 Base.h
3
4 Base definitions
5
6 Copyright (C) 1996, 1997 Free Software Foundation, Inc.
7
8 Author: Scott Christley <scottc@net-community.com>
9
10 This file is part of the Windows32 API Library.
11
12 This library is free software; you can redistribute it and/or
13 modify it under the terms of the GNU Library General Public
14 License as published by the Free Software Foundation; either
15 version 2 of the License, or (at your option) any later version.
16
17 This library is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Library General Public License for more details.
21
22 If you are interested in a warranty or support for this source code,
23 contact Scott Christley <scottc@net-community.com> for more information.
24
25 You should have received a copy of the GNU Library General Public
26 License along with this library; see the file COPYING.LIB.
27 If not, write to the Free Software Foundation,
28 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */
30
31 #ifndef _GNU_H_WINDOWS32_BASE
32 #define _GNU_H_WINDOWS32_BASE
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif /* __cplusplus */
37
38 #ifndef NULL
39 #ifdef __cplusplus
40 #define NULL (0)
41 #else
42 #define NULL ((void *)0)
43 #endif
44 #endif /* !NULL */
45
46 #define FALSE 0
47 #define TRUE 1
48
49 #ifndef RC_INVOKED
50
51 /* typedef ACMDRIVERENUMCB;
52 typedef ACMDRIVERPROC;
53 typedef ACMFILERCHOOSEHOOKPROC;
54 typedef ACMFILTERENUMCB;
55 typedef ACMFILTERTAGENUMCB;
56 typedef ACMFORMATCHOOSEHOOKPROC;
57 typedef ACMFORMATENUMCB;
58 typedef ACMFORMATTAGENUMCB;
59 typedef APPLET_PROC;
60 */
61 typedef unsigned short ATOM;
62 /* Changed from BOOL to WINBOOL to avoid Objective-C conflict */
63 typedef int WINBOOL;
64 typedef unsigned char BOOLEAN;
65 typedef unsigned char BYTE;
66 typedef unsigned long CALTYPE;
67 typedef unsigned long CALID;
68 typedef char CCHAR;
69 typedef unsigned long COLORREF;
70 #define CONST const
71
72 /* Check VOID before defining CHAR, SHORT, and LONG */
73 #ifndef VOID
74 #define VOID void
75 typedef char CHAR;
76 typedef short SHORT;
77 typedef long LONG;
78 #endif
79
80 /*
81 typedef CTRYID;
82 typedef DLGPROC;
83 */
84 typedef unsigned int DWORD; /* was unsigned long */
85 typedef double DWORDLONG, *PDWORDLONG;
86 /*
87 typedef EDITWORDBREAKPROC;
88 typedef ENHMFENUMPROC;
89 typedef ENUMRESLANGPROC;
90 typedef ENUMRESNAMEPROC;
91 typedef ENUMRESTYPEPROC;
92 */
93 typedef float FLOAT;
94 /* typedef GLOBALHANDLE; */
95 typedef void *HANDLE;
96 typedef HANDLE HACCEL;
97 typedef HANDLE HBITMAP;
98 typedef HANDLE HBRUSH;
99 typedef HANDLE HCOLORSPACE;
100 typedef HANDLE HCONV;
101 typedef HANDLE HCONVLIST;
102 typedef HANDLE HCURSOR;
103 typedef HANDLE HDBC;
104 typedef HANDLE HDC;
105 typedef HANDLE HDDEDATA;
106 typedef HANDLE HDESK;
107 typedef HANDLE HDROP;
108 typedef HANDLE HDWP;
109 typedef HANDLE HENHMETAFILE;
110 typedef HANDLE HENV;
111 typedef int HFILE;
112 typedef HANDLE HFONT;
113 typedef HANDLE HGDIOBJ;
114 typedef HANDLE HGLOBAL;
115 typedef HANDLE HGLRC;
116 typedef HANDLE HHOOK;
117 typedef HANDLE HICON;
118 typedef HANDLE HIMAGELIST;
119 typedef HANDLE HINSTANCE;
120 typedef HANDLE HKEY, *PHKEY;
121 typedef HANDLE HKL;
122 typedef HANDLE HLOCAL;
123 typedef HANDLE HMENU;
124 typedef HANDLE HMETAFILE;
125 typedef HANDLE HMODULE;
126 typedef HANDLE HPALETTE;
127 typedef HANDLE HPEN;
128 typedef HANDLE HRASCONN;
129 typedef long HRESULT;
130 typedef HANDLE HRGN;
131 typedef HANDLE HRSRC;
132 typedef HANDLE HSTMT;
133 typedef HANDLE HSZ;
134 typedef HANDLE HWINSTA;
135 typedef HANDLE HWND;
136 typedef int INT;
137 typedef unsigned short LANGID;
138 typedef DWORD LCID;
139 typedef DWORD LCTYPE;
140 /* typedef LOCALHANDLE */
141 typedef double LONGLONG, *PLONGLONG;
142 typedef unsigned short *LP;
143 typedef long LPARAM;
144 typedef WINBOOL *LPBOOL;
145 typedef BYTE *LPBYTE;
146 typedef CONST CHAR *LPCCH;
147 typedef CHAR *LPCH;
148 typedef COLORREF *LPCOLORREF;
149 typedef const char *LPCSTR;
150 typedef char* PCSZ;
151
152 #ifdef UNICODE
153 typedef const unsigned short *LPCTSTR;
154 #else
155 typedef const char *LPCTSTR;
156 #endif /* UNICODE */
157
158 typedef const unsigned short *LPCWCH;
159 typedef const unsigned short *LPCWSTR;
160 typedef DWORD *LPDWORD;
161 /* typedef LPFRHOOKPROC; */
162 typedef HANDLE *LPHANDLE;
163 /* typedef LPHANDLER_FUNCTION; */
164 typedef int *LPINT;
165 typedef long *LPLONG;
166 typedef char *LPSTR;
167
168 #ifdef UNICODE
169 typedef unsigned short *LPTCH;
170 typedef unsigned short *LPTSTR;
171 #else
172 typedef char *LPTCH;
173 typedef char *LPTSTR;
174 #endif /* UNICODE */
175
176 typedef long LRESULT;
177 typedef void *LPVOID;
178 typedef const void *LPCVOID;
179 typedef unsigned short *LPWCH;
180 typedef unsigned short *LPWORD;
181 typedef unsigned short *LPWSTR;
182 typedef unsigned short *PWSTR;
183 /* typedef NPSTR; */
184 typedef unsigned short *NWPSTR;
185 typedef WINBOOL *PWINBOOL;
186 typedef BYTE *PBOOLEAN;
187 typedef BYTE *PBYTE;
188 typedef const CHAR *PCCH;
189 typedef CHAR *PCH;
190 typedef CHAR *PCHAR;
191 typedef const char *PCSTR;
192 typedef const unsigned short *PCWCH;
193 typedef const unsigned short *PCWSTR;
194 typedef DWORD *PDWORD;
195 typedef float *PFLOAT;
196 typedef HANDLE *PHANDLE;
197 /* typedef PHKEY; */
198 typedef int *PINT;
199 /* typedef LCID *PLCID; */
200 typedef long *PLONG;
201 typedef short *PSHORT;
202 /* typedef PSID; */
203 typedef char *PSTR;
204 typedef char *PSZ;
205
206 #ifdef UNICODE
207 typedef unsigned short *PTBYTE;
208 typedef unsigned short *PTCH;
209 typedef unsigned short *PTCHAR;
210 typedef unsigned short *PTSTR;
211 #else
212 typedef unsigned char *PTBYTE;
213 typedef char *PTCH;
214 typedef char *PTCHAR;
215 typedef char *PTSTR;
216 #endif /* UNICODE */
217
218 typedef unsigned char *PUCHAR;
219 typedef unsigned int *PUINT;
220 typedef unsigned long *PULONG;
221 typedef unsigned short *PUSHORT;
222 typedef void *PVOID;
223 typedef unsigned short *PWCH;
224 typedef unsigned short *PWCHAR;
225 typedef unsigned short *PWORD;
226 /*
227 typedef PWSTR;
228 typedef REGSAM;
229 */
230
231 typedef short RETCODE;
232
233 typedef HANDLE SC_HANDLE;
234 typedef LPVOID SC_LOCK;
235 typedef SC_HANDLE *LPSC_HANDLE;
236 typedef DWORD SERVICE_STATUS_HANDLE;
237 /* typedef SPHANDLE; */
238
239 #ifdef UNICODE
240 typedef unsigned short TBYTE;
241 typedef unsigned short TCHAR;
242 typedef unsigned short BCHAR;
243 #else
244 typedef unsigned char TBYTE;
245 typedef char TCHAR;
246 typedef BYTE BCHAR;
247 #endif /* UNICODE */
248
249 typedef unsigned char UCHAR;
250 typedef unsigned int UINT;
251 typedef unsigned long ULONG;
252 typedef unsigned short USHORT;
253 typedef unsigned short WCHAR;
254 typedef unsigned short WORD;
255 typedef unsigned int WPARAM;
256 /* typedef YIELDPROC; */
257
258 /* Only use __stdcall under WIN32 compiler */
259 #ifdef i386
260 #define STDCALL __attribute__ ((stdcall))
261 #define CDECL __attribute((cdecl))
262 #define CALLBACK WINAPI
263 #define PASCAL WINAPI
264 #else
265 #define STDCALL
266 #define CDECL
267 #define CALLBACK
268 #define PASCAL
269 #endif
270 #define WINAPI STDCALL
271 #define APIENTRY STDCALL
272 #define WINGDIAPI
273
274 #define _export
275
276 /*
277 Enumerations
278 */
279 typedef enum _ACL_INFORMATION_CLASS {
280 AclRevisionInformation = 1,
281 AclSizeInformation
282 } ACL_INFORMATION_CLASS;
283
284 typedef enum _MEDIA_TYPE {
285 Unknown,
286 F5_1Pt2_512,
287 F3_1Pt44_512,
288 F3_2Pt88_512,
289 F3_20Pt8_512,
290 F3_720_512,
291 F5_360_512,
292 F5_320_512,
293 F5_320_1024,
294 F5_180_512,
295 F5_160_512,
296 RemovableMedia,
297 FixedMedia
298 } MEDIA_TYPE;
299
300 #define RASCS_DONE 0x2000
301 #define RASCS_PAUSED 0x1000
302 typedef enum _RASCONNSTATE {
303 RASCS_OpenPort = 0,
304 RASCS_PortOpened,
305 RASCS_ConnectDevice,
306 RASCS_DeviceConnected,
307 RASCS_AllDevicesConnected,
308 RASCS_Authenticate,
309 RASCS_AuthNotify,
310 RASCS_AuthRetry,
311 RASCS_AuthCallback,
312 RASCS_AuthChangePassword,
313 RASCS_AuthProject,
314 RASCS_AuthLinkSpeed,
315 RASCS_AuthAck,
316 RASCS_ReAuthenticate,
317 RASCS_Authenticated,
318 RASCS_PrepareForCallback,
319 RASCS_WaitForModemReset,
320 RASCS_WaitForCallback,
321 RASCS_Projected,
322
323 RASCS_StartAuthentication,
324 RASCS_CallbackComplete,
325 RASCS_LogonNetwork,
326
327 RASCS_Interactive = RASCS_PAUSED,
328 RASCS_RetryAuthentication,
329 RASCS_CallbackSetByCaller,
330 RASCS_PasswordExpired,
331
332 RASCS_Connected = RASCS_DONE,
333 RASCS_Disconnected
334 } RASCONNSTATE ;
335
336 typedef enum _RASPROJECTION {
337 RASP_Amb = 0x10000,
338 RASP_PppNbf = 0x803F,
339 RASP_PppIpx = 0x802B,
340 RASP_PppIp = 0x8021
341 } RASPROJECTION ;
342
343 typedef enum _SECURITY_IMPERSONATION_LEVEL {
344 SecurityAnonymous,
345 SecurityIdentification,
346 SecurityImpersonation,
347 SecurityDelegation
348 } SECURITY_IMPERSONATION_LEVEL;
349
350 typedef enum _SID_NAME_USE {
351 SidTypeUser = 1,
352 SidTypeGroup,
353 SidTypeDomain,
354 SidTypeAlias,
355 SidTypeWellKnownGroup,
356 SidTypeDeletedAccount,
357 SidTypeInvalid,
358 SidTypeUnknown
359 } SID_NAME_USE, *PSID_NAME_USE;
360
361 typedef enum _TOKEN_INFORMATION_CLASS {
362 TokenUser = 1,
363 TokenGroups,
364 TokenPrivileges,
365 TokenOwner,
366 TokenPrimaryGroup,
367 TokenDefaultDacl,
368 TokenSource,
369 TokenType,
370 TokenImpersonationLevel,
371 TokenStatistics
372 } TOKEN_INFORMATION_CLASS;
373
374 typedef enum tagTOKEN_TYPE {
375 TokenPrimary = 1,
376 TokenImpersonation
377 } TOKEN_TYPE;
378
379 #endif /* ! defined (RC_INVOKED) */
380
381 /*
382 Macros
383 */
384 #define FORWARD_WM_NOTIFY(hwnd, idFrom, pnmhdr, fn) (void)(fn)((hwnd), WM_NOTIFY, (WPARAM)(int)(id), (LPARAM)(NMHDR FAR*)(pnmhdr))
385
386 #define GetBValue(rgb) ((BYTE) ((rgb) >> 16))
387 #define GetGValue(rgb) ((BYTE) (((WORD) (rgb)) >> 8))
388 #define GetRValue(rgb) ((BYTE) (rgb))
389 #define RGB(r, g ,b) ((DWORD) (((BYTE) (r) | ((WORD) (g) << 8)) | (((DWORD) (BYTE) (b)) << 16)))
390
391 #define HANDLE_WM_NOTIFY(hwnd, wParam, lParam, fn) (fn)((hwnd), (int)(wParam), (NMHDR FAR*)(lParam))
392
393 #define HIBYTE(w) ((BYTE) (((WORD) (w) >> 8) & 0xFF))
394 #define HIWORD(l) ((WORD) (((DWORD) (l) >> 16) & 0xFFFF))
395 #define LOBYTE(w) ((BYTE) (w))
396 #define LOWORD(l) ((WORD) (l))
397 #define MAKELONG(a, b) ((LONG) (((WORD) (a)) | ((DWORD) ((WORD) (b))) << 16))
398 #define MAKEWORD(a, b) ((WORD) (((BYTE) (a)) | ((WORD) ((BYTE) (b))) << 8))
399
400 /* original Cygnus headers also had the following defined: */
401 #define SEXT_HIWORD(l) ((((int)l) >> 16))
402 #define ZEXT_HIWORD(l) ((((unsigned int)l) >> 16))
403 #define SEXT_LOWORD(l) ((int)(short)l)
404
405 #define INDEXTOOVERLAYMASK(i) ((i) << 8)
406 #define INDEXTOSTATEIMAGEMASK(i) ((i) << 12)
407
408 #define MAKEINTATOM(i) (LPTSTR) ((DWORD) ((WORD) (i)))
409 #define MAKEINTRESOURCE(i) (LPTSTR) ((DWORD) ((WORD) (i)))
410
411 #define MAKELANGID(p, s) ((((WORD) (s)) << 10) | (WORD) (p))
412 #define PRIMARYLANGID(lgid) ((WORD )(lgid) & 0x3ff)
413 #define SUBLANGID(lgid) ((WORD )(lgid) >> 10)
414
415 #define LANGIDFROMLCID(lcid) ((WORD) (lcid))
416 #define SORTIDFROMLCID(lcid) ((WORD )((((DWORD)(lcid)) & 0x000FFFFF) >> 16))
417 #define MAKELCID(lgid, srtid) ((DWORD)((((DWORD)((WORD)(srtid))) << 16) | ((DWORD)((WORD)(lgid)))))
418 #define MAKELPARAM(l, h) ((LPARAM) MAKELONG(l, h))
419 #define MAKELRESULT(l, h) ((LRESULT) MAKELONG(l, h))
420 #define MAKEPOINTS(l) (*((POINTS FAR *) & (l)))
421 #define MAKEROP4(fore,back) (DWORD)((((back) << 8) & 0xFF000000) | (fore))
422 #define MAKEWPARAM(l, h) ((WPARAM) MAKELONG(l, h))
423
424 #ifndef max
425 #define max(a, b) (((a) > (b)) ? (a) : (b))
426 #endif
427
428 #ifndef min
429 #define min(a, b) (((a) < (b)) ? (a) : (b))
430 #endif
431
432 #define PALETTEINDEX(i) ((COLORREF) (0x01000000 | (DWORD) (WORD) (i)))
433 #define PALETTERGB(r, g, b) (0x02000000 | RGB(r, g, b))
434 #define POINTSTOPOINT(pt, pts) {(pt).x = (SHORT) LOWORD(pts); (pt).y = (SHORT) HIWORD(pts);}
435 #define POINTTOPOINTS(pt) (MAKELONG((short) ((pt).x), (short) ((pt).y)))
436
437 #define INDEXTOOVERLAYMASK(i) ((i) << 8)
438 #define INDEXTOSTATEIMAGEMASK(i) ((i) << 12)
439
440 #ifdef UNICODE
441 #define TEXT(quote) L##quote
442 #else
443 #define TEXT(quote) quote
444 #endif
445
446 #ifndef RC_INVOKED
447
448 /*
449 Definitions for callback procedures
450 */
451 typedef int CALLBACK (*BFFCALLBACK) (HWND, UINT, LPARAM, LPARAM);
452 typedef UINT CALLBACK (*LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
453 typedef UINT CALLBACK (*LPCFHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
454 typedef DWORD CALLBACK (*PTHREAD_START_ROUTINE) (LPVOID);
455 typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
456 typedef DWORD CALLBACK (*EDITSTREAMCALLBACK) (DWORD, LPBYTE, LONG, LONG);
457 typedef UINT CALLBACK (*LPFRHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
458 typedef UINT CALLBACK (*LPOFNHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
459 typedef UINT CALLBACK (*LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
460 typedef UINT CALLBACK (*LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
461 typedef WINBOOL CALLBACK (*DLGPROC) (HWND, UINT, WPARAM, LPARAM);
462 typedef int CALLBACK (*PFNPROPSHEETCALLBACK) (HWND, UINT, LPARAM);
463 typedef VOID CALLBACK (*LPSERVICE_MAIN_FUNCTION) (DWORD, LPTSTR);
464 typedef int CALLBACK (*PFNTVCOMPARE) (LPARAM, LPARAM, LPARAM);
465 typedef LRESULT CALLBACK (*WNDPROC) (HWND, UINT, WPARAM, LPARAM);
466 typedef int CALLBACK (*FARPROC)(void);
467 typedef FARPROC PROC;
468 typedef WINBOOL CALLBACK (*ENUMRESTYPEPROC) (HANDLE, LPTSTR, LONG);
469 typedef WINBOOL CALLBACK (*ENUMRESNAMEPROC) (HANDLE, LPCTSTR, LPTSTR, LONG);
470 typedef WINBOOL CALLBACK (*ENUMRESLANGPROC) (HANDLE, LPCTSTR, LPCTSTR, WORD, LONG);
471 typedef FARPROC DESKTOPENUMPROC;
472 typedef WINBOOL CALLBACK (*ENUMWINDOWSPROC) (HWND, LPARAM);
473 typedef WINBOOL CALLBACK (*ENUMWINDOWSTATIONPROC) (LPTSTR, LPARAM);
474 typedef VOID CALLBACK (*SENDASYNCPROC) (HWND, UINT, DWORD, LRESULT);
475 typedef VOID CALLBACK (*TIMERPROC) (HWND, UINT, UINT, DWORD);
476 typedef FARPROC GRAYSTRINGPROC;
477 typedef WINBOOL CALLBACK (*DRAWSTATEPROC) (HDC, LPARAM, WPARAM, int, int);
478 typedef WINBOOL CALLBACK (*PROPENUMPROCEX) (HWND, LPCTSTR, HANDLE, DWORD);
479 typedef WINBOOL CALLBACK (*PROPENUMPROC) (HWND, LPCTSTR, HANDLE);
480 typedef LRESULT CALLBACK (*HOOKPROC) (int, WPARAM, LPARAM);
481 typedef VOID CALLBACK (*ENUMOBJECTSPROC) (LPVOID, LPARAM);
482 typedef VOID CALLBACK (*LINEDDAPROC) (int, int, LPARAM);
483 typedef WINBOOL CALLBACK (*ABORTPROC) (HDC, int);
484 typedef UINT CALLBACK (*LPPAGEPAINTHOOK) (HWND, UINT, WPARAM, LPARAM );
485 typedef UINT CALLBACK (*LPPAGESETUPHOOK) (HWND, UINT, WPARAM, LPARAM );
486 typedef int CALLBACK (*ICMENUMPROC) (LPTSTR, LPARAM);
487 typedef LONG (*EDITWORDBREAKPROCEX) (char *, LONG, BYTE, INT);
488 typedef int CALLBACK (*PFNLVCOMPARE) (LPARAM, LPARAM, LPARAM);
489 typedef WINBOOL CALLBACK (*LOCALE_ENUMPROC) (LPTSTR);
490 typedef WINBOOL CALLBACK (*CODEPAGE_ENUMPROC) (LPTSTR);
491 typedef WINBOOL CALLBACK (*DATEFMT_ENUMPROC) (LPTSTR);
492 typedef WINBOOL CALLBACK (*TIMEFMT_ENUMPROC) (LPTSTR);
493 typedef WINBOOL CALLBACK (*CALINFO_ENUMPROC) (LPTSTR);
494 typedef WINBOOL CALLBACK (*PHANDLER_ROUTINE) (DWORD);
495 typedef WINBOOL CALLBACK (*LPHANDLER_FUNCTION) (DWORD);
496 typedef UINT CALLBACK (*PFNGETPROFILEPATH) (LPCTSTR, LPSTR, UINT);
497 typedef UINT CALLBACK (*PFNRECONCILEPROFILE) (LPCTSTR, LPCTSTR, DWORD);
498 typedef WINBOOL CALLBACK (*PFNPROCESSPOLICIES) (HWND, LPCTSTR, LPCTSTR, LPCTSTR, DWORD);
499
500 #define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
501 #define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
502 #define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2}
503 #define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3}
504 #define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4}
505 #define SECURITY_NT_AUTHORITY {0,0,0,0,0,5}
506
507 #define SE_CREATE_TOKEN_NAME TEXT("SeCreateTokenPrivilege")
508 #define SE_ASSIGNPRIMARYTOKEN_NAME TEXT("SeAssignPrimaryTokenPrivilege")
509 #define SE_LOCK_MEMORY_NAME TEXT("SeLockMemoryPrivilege")
510 #define SE_INCREASE_QUOTA_NAME TEXT("SeIncreaseQuotaPrivilege")
511 #define SE_UNSOLICITED_INPUT_NAME TEXT("SeUnsolicitedInputPrivilege")
512 #define SE_MACHINE_ACCOUNT_NAME TEXT("SeMachineAccountPrivilege")
513 #define SE_TCB_NAME TEXT("SeTcbPrivilege")
514 #define SE_SECURITY_NAME TEXT("SeSecurityPrivilege")
515 #define SE_TAKE_OWNERSHIP_NAME TEXT("SeTakeOwnershipPrivilege")
516 #define SE_LOAD_DRIVER_NAME TEXT("SeLoadDriverPrivilege")
517 #define SE_SYSTEM_PROFILE_NAME TEXT("SeSystemProfilePrivilege")
518 #define SE_SYSTEMTIME_NAME TEXT("SeSystemtimePrivilege")
519 #define SE_PROF_SINGLE_PROCESS_NAME TEXT("SeProfileSingleProcessPrivilege")
520 #define SE_INC_BASE_PRIORITY_NAME TEXT("SeIncreaseBasePriorityPrivilege")
521 #define SE_CREATE_PAGEFILE_NAME TEXT("SeCreatePagefilePrivilege")
522 #define SE_CREATE_PERMANENT_NAME TEXT("SeCreatePermanentPrivilege")
523 #define SE_BACKUP_NAME TEXT("SeBackupPrivilege")
524 #define SE_RESTORE_NAME TEXT("SeRestorePrivilege")
525 #define SE_SHUTDOWN_NAME TEXT("SeShutdownPrivilege")
526 #define SE_DEBUG_NAME TEXT("SeDebugPrivilege")
527 #define SE_AUDIT_NAME TEXT("SeAuditPrivilege")
528 #define SE_SYSTEM_ENVIRONMENT_NAME TEXT("SeSystemEnvironmentPrivilege")
529 #define SE_CHANGE_NOTIFY_NAME TEXT("SeChangeNotifyPrivilege")
530 #define SE_REMOTE_SHUTDOWN_NAME TEXT("SeRemoteShutdownPrivilege")
531
532 #define SERVICES_ACTIVE_DATABASEW L"ServicesActive"
533 #define SERVICES_FAILED_DATABASEW L"ServicesFailed"
534 #define SERVICES_ACTIVE_DATABASEA "ServicesActive"
535 #define SERVICES_FAILED_DATABASEA "ServicesFailed"
536 #define SC_GROUP_IDENTIFIERW L'+'
537 #define SC_GROUP_IDENTIFIERA '+'
538
539 #ifdef UNICODE
540 #define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEW
541 #define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEW
542 #define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERW
543 #else
544 #define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEA
545 #define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEA
546 #define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERA
547 #endif /* UNICODE */
548
549 /* ---------------------------------- */
550 /* From ddeml.h in old Cygnus headers */
551
552 typedef void (*CALLB) (void);
553 typedef CALLB PFNCALLBACK;
554
555 typedef WINBOOL SECURITY_CONTEXT_TRACKING_MODE;
556
557 /* End of stuff from ddeml.h in old Cygnus headers */
558 /* ----------------------------------------------- */
559
560 typedef FARPROC WNDENUMPROC;
561 typedef FARPROC ENHMFENUMPROC;
562 typedef DWORD CCSTYLE, *PCCSTYLE, *LPCCSTYLE;
563 typedef DWORD CCSTYLEFLAGA, *PCCSTYLEFLAGA, *LPCCSTYLEFLAGA;
564 #define DECLARE_HANDLE(s) typedef HANDLE s
565
566 #endif /* ! defined (RC_INVOKED) */
567
568 #ifdef __cplusplus
569 }
570 #endif /* __cplusplus */
571
572 #endif /* _GNU_H_WINDOWS32_BASE */