|
|
1.1 root 1: /*++ BUILD Version: 0001 // Increment this if a change has global effects
2:
3: Copyright (c) 1990 Microsoft Corporation
4:
5: Module Name:
6:
7: winbase.h
8:
9: Abstract:
10:
11: This module defines the 32-Bit Windows Base APIs
12:
13: Created:
14:
15: 18-Sep-1990
16:
17: Revision History:
18:
19: --*/
20:
21: #ifndef _WINBASE_
22: #define _WINBASE_
23:
1.1.1.3 ! root 24: #ifdef __cplusplus
! 25: extern "C" {
! 26: #endif
! 27:
1.1 root 28: /*
29: * Compatability macros
30: */
31:
32: #define DefineHandleTable(w) ((w),TRUE)
33: #define LimitEmsPages(dw)
34: #define SetSwapAreaSize(w) (w)
35: #define LockSegment(w) GlobalFix((HANDLE)(w))
36: #define UnlockSegment(w) GlobalUnfix((HANDLE)(w))
1.1.1.2 root 37: #define GetCurrentTime() GetTickCount()
1.1 root 38:
39: #define Yield()
40:
41: #define INVALID_HANDLE_VALUE (HANDLE)-1
42: #define FILE_BEGIN 0
43: #define FILE_CURRENT 1
44: #define FILE_END 2
45:
46: #define WAIT_OBJECT_0 ((STATUS_WAIT_0 ) + 0 )
47:
48: #define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0 ) + 0 )
49: #define WAIT_ABANDONED_0 ((STATUS_ABANDONED_WAIT_0 ) + 0 )
50:
51: #define WAIT_TIMEOUT STATUS_TIMEOUT
1.1.1.2 root 52: #define WAIT_IO_COMPLETION STATUS_USER_APC
1.1 root 53: #define STILL_ACTIVE STATUS_PENDING
54: #define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
55: #define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
56: #define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
57: #define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
1.1.1.2 root 58: #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
59: #define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
60: #define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
61: #define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
62: #define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
63: #define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
64: #define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
65: #define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
66: #define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
67: #define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
68: #define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
1.1 root 69: #define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT
70:
71: //
1.1.1.2 root 72: // File creation flags must start at the high end since they
1.1 root 73: // are combined with the attributes
74: //
75:
1.1.1.2 root 76: #define FILE_FLAG_WRITE_THROUGH 0x80000000
77: #define FILE_FLAG_OVERLAPPED 0x40000000
78: #define FILE_FLAG_NO_BUFFERING 0x20000000
79: #define FILE_FLAG_RANDOM_ACCESS 0x10000000
80: #define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000
81: #define FILE_FLAG_DELETE_ON_CLOSE 0x04000000
82: #define FILE_FLAG_BACKUP_SEMANTICS 0x02000000
1.1.1.3 ! root 83: #define FILE_FLAG_POSIX_SEMANTICS 0x01000000
1.1 root 84:
85: #define CREATE_NEW 1
86: #define CREATE_ALWAYS 2
87: #define OPEN_EXISTING 3
88: #define OPEN_ALWAYS 4
89: #define TRUNCATE_EXISTING 5
90:
91: //
92: // Define the NamedPipe definitions
93: //
94:
95:
96: //
97: // Define the dwOpenMode values for CreateNamedPipe
98: //
99:
100: #define PIPE_ACCESS_INBOUND 0x00000001
101: #define PIPE_ACCESS_OUTBOUND 0x00000002
102: #define PIPE_ACCESS_DUPLEX 0x00000003
103:
104: //
105: // Define the Named Pipe End flags for GetNamedPipeInfo
106: //
107:
108: #define PIPE_CLIENT_END 0x00000000
109: #define PIPE_SERVER_END 0x00000001
110:
111: //
112: // Define the dwPipeMode values for CreateNamedPipe
113: //
114:
115: #define PIPE_WAIT 0x00000000
116: #define PIPE_NOWAIT 0x00000001
117: #define PIPE_READMODE_BYTE 0x00000000
118: #define PIPE_READMODE_MESSAGE 0x00000002
119: #define PIPE_TYPE_BYTE 0x00000000
120: #define PIPE_TYPE_MESSAGE 0x00000004
121:
122: //
123: // Define the well known values for CreateNamedPipe nMaxInstances
124: //
125:
126: #define PIPE_UNLIMITED_INSTANCES 255
127:
128: //
1.1.1.2 root 129: // Define the Security Quality of Service bits to be passed
130: // into CreateFile
1.1 root 131: //
132:
1.1.1.2 root 133: #define SECURITY_ANONYMOUS ( SecurityAnonymous << 16 )
134: #define SECURITY_IDENTIFICATION ( SecurityIdentification << 16 )
135: #define SECURITY_IMPERSONATION ( SecurityImpersonation << 16 )
136: #define SECURITY_DELEGATION ( SecurityDelegation << 16 )
137:
138: #define SECURITY_CONTEXT_TRACKING 0x00040000
139: #define SECURITY_EFFECTIVE_ONLY 0x00080000
140:
141: #define SECURITY_SQOS_PRESENT 0x00100000
142: #define SECURITY_VALID_SQOS_FLAGS 0x001F0000
143:
144:
1.1 root 145: //
1.1.1.2 root 146: // Special values for mailslot information.
1.1 root 147: //
148:
149: //
1.1.1.2 root 150: // Special value for NextMessageSize to indicate that there is no next
151: // message.
1.1 root 152: //
153:
1.1.1.2 root 154: #define MAILSLOT_NO_MESSAGE ((ULONG)-1)
1.1 root 155:
156: //
157: // Special value for read timeout to indicate that mailslot reads should
158: // never timeout.
159: //
160:
1.1.1.2 root 161: #define MAILSLOT_WAIT_FOREVER ((ULONG)-1)
1.1 root 162:
163: //
164: // File structures
165: //
166:
167: typedef struct _OVERLAPPED {
168: DWORD Internal;
169: DWORD InternalHigh;
170: DWORD Offset;
171: DWORD OffsetHigh;
172: HANDLE hEvent;
173: } OVERLAPPED, *LPOVERLAPPED;
174:
175: typedef struct _SECURITY_ATTRIBUTES {
176: DWORD nLength;
177: LPVOID lpSecurityDescriptor;
178: BOOL bInheritHandle;
179: } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
180:
181: typedef struct _PROCESS_INFORMATION {
182: HANDLE hProcess;
183: HANDLE hThread;
184: DWORD dwProcessId;
185: DWORD dwThreadId;
186: } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
187:
188: //
189: // File System time stamps are represented with the following structure:
190: //
191:
192: typedef struct _FILETIME {
193: DWORD dwLowDateTime;
194: DWORD dwHighDateTime;
195: } FILETIME, *PFILETIME, *LPFILETIME;
196:
197: //
198: // System time is represented with the following structure:
199: //
200:
201: typedef struct _SYSTEMTIME {
202: WORD wYear;
203: WORD wMonth;
204: WORD wDayOfWeek;
205: WORD wDay;
206: WORD wHour;
207: WORD wMinute;
208: WORD wSecond;
209: WORD wMilliseconds;
210: } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
211:
1.1.1.3 ! root 212: typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(
1.1 root 213: LPVOID lpThreadParameter
214: );
215: typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
216:
217: typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
218: typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;
219: typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;
220:
1.1.1.3 ! root 221: typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG;
! 222: typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG;
! 223: typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG;
! 224:
1.1 root 225: #ifdef i386
226: typedef PLDT_ENTRY LPLDT_ENTRY;
227: #else
228: typedef LPVOID LPLDT_ENTRY;
229: #endif
230:
231: #define MUTEX_MODIFY_STATE MUTANT_QUERY_STATE
232: #define MUTEX_ALL_ACCESS MUTANT_ALL_ACCESS
233:
234: //
1.1.1.2 root 235: // Serial provider type.
236: //
237:
238: #define SP_SERIALCOMM ((DWORD)0x00000001)
239:
240: //
241: // Provider SubTypes
242: //
243:
244: #define PST_UNSPECIFIED ((DWORD)0x00000000)
245: #define PST_RS232 ((DWORD)0x00000001)
246: #define PST_PARALLELPORT ((DWORD)0x00000002)
247: #define PST_RS422 ((DWORD)0x00000003)
248: #define PST_RS423 ((DWORD)0x00000004)
249: #define PST_RS449 ((DWORD)0x00000005)
250: #define PST_FAX ((DWORD)0x00000021)
251: #define PST_SCANNER ((DWORD)0x00000022)
252: #define PST_NETWORK_BRIDGE ((DWORD)0x00000100)
253: #define PST_LAT ((DWORD)0x00000101)
254: #define PST_TCPIP_TELNET ((DWORD)0x00000102)
255: #define PST_X25 ((DWORD)0x00000103)
256:
257:
258: //
1.1 root 259: // Provider capabilities flags.
260: //
261:
1.1.1.2 root 262: #define PCF_DTRDSR ((DWORD)0x0001)
263: #define PCF_RTSCTS ((DWORD)0x0002)
264: #define PCF_RLSD ((DWORD)0x0004)
265: #define PCF_PARITY_CHECK ((DWORD)0x0008)
266: #define PCF_XONXOFF ((DWORD)0x0010)
267: #define PCF_SETXCHAR ((DWORD)0x0020)
268: #define PCF_TOTALTIMEOUTS ((DWORD)0x0040)
269: #define PCF_INTTIMEOUTS ((DWORD)0x0080)
270: #define PCF_SPECIALCHARS ((DWORD)0x0100)
271: #define PCF_16BITMODE ((DWORD)0x0200)
1.1 root 272:
273: //
274: // Comm provider settable parameters.
275: //
276:
277: #define SP_PARITY ((DWORD)0x0001)
278: #define SP_BAUD ((DWORD)0x0002)
279: #define SP_DATABITS ((DWORD)0x0004)
280: #define SP_STOPBITS ((DWORD)0x0008)
281: #define SP_HANDSHAKING ((DWORD)0x0010)
282: #define SP_PARITY_CHECK ((DWORD)0x0020)
1.1.1.2 root 283: #define SP_RLSD ((DWORD)0x0040)
1.1 root 284:
285: //
286: // Settable baud rates in the provider.
287: //
288:
289: #define BAUD_075 ((DWORD)0x00000001)
290: #define BAUD_110 ((DWORD)0x00000002)
291: #define BAUD_134_5 ((DWORD)0x00000004)
292: #define BAUD_150 ((DWORD)0x00000008)
293: #define BAUD_300 ((DWORD)0x00000010)
294: #define BAUD_600 ((DWORD)0x00000020)
295: #define BAUD_1200 ((DWORD)0x00000040)
296: #define BAUD_1800 ((DWORD)0x00000080)
297: #define BAUD_2400 ((DWORD)0x00000100)
298: #define BAUD_4800 ((DWORD)0x00000200)
299: #define BAUD_7200 ((DWORD)0x00000400)
300: #define BAUD_9600 ((DWORD)0x00000800)
301: #define BAUD_14400 ((DWORD)0x00001000)
302: #define BAUD_19200 ((DWORD)0x00002000)
303: #define BAUD_38400 ((DWORD)0x00004000)
304: #define BAUD_56K ((DWORD)0x00008000)
1.1.1.2 root 305: #define BAUD_128K ((DWORD)0x00010000)
1.1 root 306: #define BAUD_USER ((DWORD)0x10000000)
307:
308: //
309: // Settable Data Bits
310: //
311:
312: #define DATABITS_5 ((WORD)0x0001)
313: #define DATABITS_6 ((WORD)0x0002)
314: #define DATABITS_7 ((WORD)0x0004)
315: #define DATABITS_8 ((WORD)0x0008)
316: #define DATABITS_16 ((WORD)0x0010)
317: #define DATABITS_16X ((WORD)0x0020)
318:
319: //
320: // Settable Stop and Parity bits.
321: //
322:
323: #define STOPBITS_10 ((WORD)0x0001)
324: #define STOPBITS_15 ((WORD)0x0002)
325: #define STOPBITS_20 ((WORD)0x0004)
326: #define PARITY_NONE ((WORD)0x0100)
327: #define PARITY_ODD ((WORD)0x0200)
328: #define PARITY_EVEN ((WORD)0x0400)
329: #define PARITY_MARK ((WORD)0x0800)
330: #define PARITY_SPACE ((WORD)0x1000)
331:
332: typedef struct _COMMPROP {
333: WORD wPacketLength;
334: WORD wPacketVersion;
335: DWORD dwServiceMask;
1.1.1.2 root 336: DWORD dwReserved1;
1.1 root 337: DWORD dwMaxTxQueue;
338: DWORD dwMaxRxQueue;
339: DWORD dwMaxBaud;
340: DWORD dwProvSubType;
341: DWORD dwProvCapabilities;
342: DWORD dwSettableParams;
343: DWORD dwSettableBaud;
344: WORD wSettableData;
345: WORD wSettableStopParity;
346: DWORD dwCurrentTxQueue;
347: DWORD dwCurrentRxQueue;
348: DWORD dwProvSpec1;
349: DWORD dwProvSpec2;
1.1.1.2 root 350: WCHAR wcProvChar[1];
1.1 root 351: } COMMPROP,*LPCOMMPROP;
352:
353: typedef struct _COMSTAT {
354: DWORD fCtsHold : 1;
355: DWORD fDsrHold : 1;
356: DWORD fRlsdHold : 1;
357: DWORD fXoffHold : 1;
358: DWORD fXoffSent : 1;
359: DWORD fEof : 1;
360: DWORD fTxim : 1;
361: DWORD fReserved : 17;
362: DWORD cbInQue;
363: DWORD cbOutQue;
364: } COMSTAT, *LPCOMSTAT;
365:
366: //
367: // DTR Control Flow Values.
368: //
369: #define DTR_CONTROL_DISABLE 0x00
370: #define DTR_CONTROL_ENABLE 0x01
371: #define DTR_CONTROL_HANDSHAKE 0x02
372:
373: //
374: // RTS Control Flow Values
375: //
376: #define RTS_CONTROL_DISABLE 0x00
377: #define RTS_CONTROL_ENABLE 0x01
378: #define RTS_CONTROL_HANDSHAKE 0x02
1.1.1.2 root 379: #define RTS_CONTROL_TOGGLE 0x03
1.1 root 380:
381: typedef struct _DCB {
382: DWORD DCBlength; /* sizeof(DCB) */
383: DWORD BaudRate; /* Baudrate at which running */
384: DWORD fBinary: 1; /* Binary Mode (skip EOF check) */
385: DWORD fParity: 1; /* Enable parity checking */
386: DWORD fOutxCtsFlow:1; /* CTS handshaking on output */
387: DWORD fOutxDsrFlow:1; /* DSR handshaking on output */
388: DWORD fDtrControl:2; /* DTR Flow control */
1.1.1.2 root 389: DWORD fDsrSensitivity:1; /* DSR Sensitivity */
390: DWORD fTXContinueOnXoff: 1; /* Continue TX when Xoff sent */
1.1 root 391: DWORD fOutX: 1; /* Enable output X-ON/X-OFF */
392: DWORD fInX: 1; /* Enable input X-ON/X-OFF */
1.1.1.2 root 393: DWORD fErrorChar: 1; /* Enable Err Replacement */
1.1 root 394: DWORD fNull: 1; /* Enable Null stripping */
395: DWORD fRtsControl:2; /* Rts Flow control */
1.1.1.2 root 396: DWORD fAbortOnError:1; /* Abort all reads and writes on Error */
397: DWORD fDummy2:1; /* Reserved */
398: WORD wReserved; /* Not currently used */
1.1 root 399: WORD XonLim; /* Transmit X-ON threshold */
400: WORD XoffLim; /* Transmit X-OFF threshold */
401: BYTE ByteSize; /* Number of bits/byte, 4-8 */
402: BYTE Parity; /* 0-4=None,Odd,Even,Mark,Space */
403: BYTE StopBits; /* 0,1,2 = 1, 1.5, 2 */
404: char XonChar; /* Tx and Rx X-ON character */
405: char XoffChar; /* Tx and Rx X-OFF character */
1.1.1.2 root 406: char ErrorChar; /* Error replacement char */
1.1 root 407: char EofChar; /* End of Input character */
408: char EvtChar; /* Recieved Event character */
409: } DCB, *LPDCB;
410:
411: typedef struct _COMMTIMEOUTS {
412: DWORD ReadIntervalTimeout; /* Maximum time between read chars. */
413: DWORD ReadTotalTimeoutMultiplier; /* Multiplier of characters. */
414: DWORD ReadTotalTimeoutConstant; /* Constant in milliseconds. */
415: DWORD WriteTotalTimeoutMultiplier; /* Multiplier of characters. */
416: DWORD WriteTotalTimeoutConstant; /* Constant in milliseconds. */
417: } COMMTIMEOUTS,*LPCOMMTIMEOUTS;
418:
419: typedef struct _SYSTEM_INFO {
420: DWORD dwOemId;
421: DWORD dwPageSize;
422: LPVOID lpMinimumApplicationAddress;
423: LPVOID lpMaximumApplicationAddress;
424: DWORD dwActiveProcessorMask;
425: DWORD dwNumberOfProcessors;
426: DWORD dwProcessorType;
1.1.1.3 ! root 427: DWORD dwReserved1;
! 428: DWORD dwReserved2;
1.1 root 429: } SYSTEM_INFO, *LPSYSTEM_INFO;
430:
431: #define FreeModule(hLibModule) FreeLibrary((hLibModule))
432: #define MakeProcInstance(lpProc,hInstance) (lpProc)
1.1.1.3 ! root 433: #define FreeProcInstance(lpProc) (lpProc)
1.1 root 434:
435: /* Global Memory Flags */
436: #define GMEM_FIXED 0x0000
437: #define GMEM_MOVEABLE 0x0002
438: #define GMEM_NOCOMPACT 0x0010
439: #define GMEM_NODISCARD 0x0020
440: #define GMEM_ZEROINIT 0x0040
441: #define GMEM_MODIFY 0x0080
442: #define GMEM_DISCARDABLE 0x0100
443: #define GMEM_NOT_BANKED 0x1000
444: #define GMEM_SHARE 0x2000
445: #define GMEM_DDESHARE 0x2000
446: #define GMEM_NOTIFY 0x4000
447: #define GMEM_LOWER GMEM_NOT_BANKED
448: #define GMEM_VALID_FLAGS 0x7F72
449: #define GMEM_INVALID_HANDLE 0x8000
450:
451: #define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT)
452: #define GPTR (GMEM_FIXED | GMEM_ZEROINIT)
453:
1.1.1.2 root 454: #define GlobalLRUNewest( h ) (HANDLE)(h)
455: #define GlobalLRUOldest( h ) (HANDLE)(h)
456: #define GlobalDiscard( h ) GlobalReAlloc( (h), 0, GMEM_MOVEABLE )
1.1 root 457:
458: /* Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE) */
459: #define GMEM_DISCARDED 0x4000
460: #define GMEM_LOCKCOUNT 0x00FF
461:
462: typedef struct _MEMORYSTATUS {
463: DWORD dwLength;
464: DWORD dwMemoryLoad;
465: DWORD dwTotalPhys;
466: DWORD dwAvailPhys;
467: DWORD dwTotalPageFile;
468: DWORD dwAvailPageFile;
469: DWORD dwTotalVirtual;
470: DWORD dwAvailVirtual;
471: } MEMORYSTATUS, *LPMEMORYSTATUS;
472:
473: /* Local Memory Flags */
474: #define LMEM_FIXED 0x0000
475: #define LMEM_MOVEABLE 0x0002
476: #define LMEM_NOCOMPACT 0x0010
477: #define LMEM_NODISCARD 0x0020
478: #define LMEM_ZEROINIT 0x0040
479: #define LMEM_MODIFY 0x0080
480: #define LMEM_DISCARDABLE 0x0F00
481: #define LMEM_VALID_FLAGS 0x0F72
482: #define LMEM_INVALID_HANDLE 0x8000
483:
484: #define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
485: #define LPTR (LMEM_FIXED | LMEM_ZEROINIT)
486:
487: #define NONZEROLHND (LMEM_MOVEABLE)
488: #define NONZEROLPTR (LMEM_FIXED)
489:
1.1.1.2 root 490: #define LocalDiscard( h ) LocalReAlloc( (h), 0, LMEM_MOVEABLE )
1.1 root 491:
492: /* Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) */
493: #define LMEM_DISCARDED 0x4000
494: #define LMEM_LOCKCOUNT 0x00FF
495:
496: //
497: // dwCreationFlag values
498: //
499:
500: #define DEBUG_PROCESS 0x00000001
501: #define DEBUG_ONLY_THIS_PROCESS 0x00000002
502:
503: #define CREATE_SUSPENDED 0x00000004
504:
505: #define DETACHED_PROCESS 0x00000008
506:
507: #define CREATE_NEW_CONSOLE 0x00000010
508:
1.1.1.2 root 509: #define NORMAL_PRIORITY_CLASS 0x00000020
510: #define IDLE_PRIORITY_CLASS 0x00000040
511: #define HIGH_PRIORITY_CLASS 0x00000080
1.1.1.3 ! root 512: #define REALTIME_PRIORITY_CLASS 0x00000100
! 513:
! 514: #define CREATE_NEW_PROCESS_GROUP 0x00000200
1.1.1.2 root 515:
516: #define CREATE_NO_WINDOW 0x08000000
517:
1.1 root 518: #define PROFILE_USER 0x10000000
519: #define PROFILE_KERNEL 0x20000000
520: #define PROFILE_SERVER 0x40000000
521:
522: #define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
523: #define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
524: #define THREAD_PRIORITY_NORMAL 0
525: #define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
526: #define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)
527: #define THREAD_PRIORITY_ERROR_RETURN (MAXLONG)
528:
1.1.1.3 ! root 529: #define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT
! 530: #define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
! 531:
1.1 root 532: //
533: // Debug APIs
534: //
535: #define EXCEPTION_DEBUG_EVENT 1
536: #define CREATE_THREAD_DEBUG_EVENT 2
537: #define CREATE_PROCESS_DEBUG_EVENT 3
538: #define EXIT_THREAD_DEBUG_EVENT 4
539: #define EXIT_PROCESS_DEBUG_EVENT 5
540: #define LOAD_DLL_DEBUG_EVENT 6
541: #define UNLOAD_DLL_DEBUG_EVENT 7
542: #define OUTPUT_DEBUG_STRING_EVENT 8
1.1.1.2 root 543: #define RIP_EVENT 9
1.1 root 544:
545: typedef struct _EXCEPTION_DEBUG_INFO {
546: EXCEPTION_RECORD ExceptionRecord;
547: DWORD dwFirstChance;
548: } EXCEPTION_DEBUG_INFO, *LPEXCEPTION_DEBUG_INFO;
549:
550: typedef struct _CREATE_THREAD_DEBUG_INFO {
551: HANDLE hThread;
552: LPTHREAD_START_ROUTINE lpStartAddress;
553: } CREATE_THREAD_DEBUG_INFO, *LPCREATE_THREAD_DEBUG_INFO;
554:
555: typedef struct _CREATE_PROCESS_DEBUG_INFO {
556: HANDLE hFile;
557: HANDLE hProcess;
558: HANDLE hThread;
559: LPVOID lpBaseOfImage;
560: DWORD dwDebugInfoFileOffset;
561: DWORD nDebugInfoSize;
562: LPTHREAD_START_ROUTINE lpStartAddress;
563: } CREATE_PROCESS_DEBUG_INFO, *LPCREATE_PROCESS_DEBUG_INFO;
564:
565: typedef struct _EXIT_THREAD_DEBUG_INFO {
566: DWORD dwExitCode;
567: } EXIT_THREAD_DEBUG_INFO, *LPEXIT_THREAD_DEBUG_INFO;
568:
569: typedef struct _EXIT_PROCESS_DEBUG_INFO {
570: DWORD dwExitCode;
571: } EXIT_PROCESS_DEBUG_INFO, *LPEXIT_PROCESS_DEBUG_INFO;
572:
573: typedef struct _LOAD_DLL_DEBUG_INFO {
574: HANDLE hFile;
575: LPVOID lpBaseOfDll;
576: DWORD dwDebugInfoFileOffset;
577: DWORD nDebugInfoSize;
578: } LOAD_DLL_DEBUG_INFO, *LPLOAD_DLL_DEBUG_INFO;
579:
580: typedef struct _UNLOAD_DLL_DEBUG_INFO {
581: LPVOID lpBaseOfDll;
582: } UNLOAD_DLL_DEBUG_INFO, *LPUNLOAD_DLL_DEBUG_INFO;
583:
584: typedef struct _OUTPUT_DEBUG_STRING_INFO {
585: LPSTR lpDebugStringData;
586: WORD fUnicode;
587: WORD nDebugStringLength;
588: } OUTPUT_DEBUG_STRING_INFO, *LPOUTPUT_DEBUG_STRING_INFO;
589:
1.1.1.2 root 590: typedef struct _RIP_INFO {
591: DWORD dwError;
592: DWORD dwType;
593: } RIP_INFO, *LPRIP_INFO;
594:
595:
1.1 root 596: typedef struct _DEBUG_EVENT {
597: DWORD dwDebugEventCode;
598: DWORD dwProcessId;
599: DWORD dwThreadId;
600: union {
601: EXCEPTION_DEBUG_INFO Exception;
602: CREATE_THREAD_DEBUG_INFO CreateThread;
603: CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
604: EXIT_THREAD_DEBUG_INFO ExitThread;
605: EXIT_THREAD_DEBUG_INFO ExitProcess;
606: LOAD_DLL_DEBUG_INFO LoadDll;
607: UNLOAD_DLL_DEBUG_INFO UnloadDll;
608: OUTPUT_DEBUG_STRING_INFO DebugString;
1.1.1.2 root 609: RIP_INFO RipInfo;
1.1 root 610: } u;
611: } DEBUG_EVENT, *LPDEBUG_EVENT;
612:
613: typedef PCONTEXT LPCONTEXT;
614: typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
1.1.1.2 root 615: typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;
1.1 root 616:
617: #define DRIVE_REMOVABLE 2
618: #define DRIVE_FIXED 3
619: #define DRIVE_REMOTE 4
620: #define DRIVE_CDROM 5
621: #define DRIVE_RAMDISK 6
622:
623:
624: #define GetFreeSpace(w) (0x100000L)
625:
626:
627: #define FILE_TYPE_UNKNOWN 0x0000
628: #define FILE_TYPE_DISK 0x0001
629: #define FILE_TYPE_CHAR 0x0002
630: #define FILE_TYPE_PIPE 0x0003
631: #define FILE_TYPE_REMOTE 0x8000
632:
633:
634: #define STD_INPUT_HANDLE (DWORD)-10
635: #define STD_OUTPUT_HANDLE (DWORD)-11
636: #define STD_ERROR_HANDLE (DWORD)-12
637:
638: #define NOPARITY 0
639: #define ODDPARITY 1
640: #define EVENPARITY 2
641: #define MARKPARITY 3
642: #define SPACEPARITY 4
643:
644: #define ONESTOPBIT 0
645: #define ONE5STOPBITS 1
646: #define TWOSTOPBITS 2
647:
648: #define IGNORE 0 // Ignore signal
649: #define INFINITE 0xFFFFFFFF // Infinite timeout
650:
651: //
652: // Basud rates at which the communication device operates
653: //
654:
655: #define CBR_110 110
656: #define CBR_300 300
657: #define CBR_600 600
658: #define CBR_1200 1200
659: #define CBR_2400 2400
660: #define CBR_4800 4800
661: #define CBR_9600 9600
662: #define CBR_14400 14400
663: #define CBR_19200 19200
664: #define CBR_38400 38400
665: #define CBR_56000 56000
666: #define CBR_128000 128000
667: #define CBR_256000 256000
668:
669: //
670: // Error Flags
671: //
672:
673: #define CE_RXOVER 0x0001 // Receive Queue overflow
674: #define CE_OVERRUN 0x0002 // Receive Overrun Error
675: #define CE_RXPARITY 0x0004 // Receive Parity Error
676: #define CE_FRAME 0x0008 // Receive Framing error
677: #define CE_BREAK 0x0010 // Break Detected
678: #define CE_TXFULL 0x0100 // TX Queue is full
679: #define CE_PTO 0x0200 // LPTx Timeout
680: #define CE_IOE 0x0400 // LPTx I/O Error
681: #define CE_DNS 0x0800 // LPTx Device not selected
682: #define CE_OOP 0x1000 // LPTx Out-Of-Paper
683: #define CE_MODE 0x8000 // Requested mode unsupported
684:
685: #define IE_BADID (-1) // Invalid or unsupported id
686: #define IE_OPEN (-2) // Device Already Open
687: #define IE_NOPEN (-3) // Device Not Open
688: #define IE_MEMORY (-4) // Unable to allocate queues
689: #define IE_DEFAULT (-5) // Error in default parameters
690: #define IE_HARDWARE (-10) // Hardware Not Present
691: #define IE_BYTESIZE (-11) // Illegal Byte Size
692: #define IE_BAUDRATE (-12) // Unsupported BaudRate
693:
694: //
695: // Events
696: //
697:
698: #define EV_RXCHAR 0x0001 // Any Character received
699: #define EV_RXFLAG 0x0002 // Received certain character
700: #define EV_TXEMPTY 0x0004 // Transmitt Queue Empty
701: #define EV_CTS 0x0008 // CTS changed state
702: #define EV_DSR 0x0010 // DSR changed state
703: #define EV_RLSD 0x0020 // RLSD changed state
704: #define EV_BREAK 0x0040 // BREAK received
705: #define EV_ERR 0x0080 // Line status error occurred
706: #define EV_RING 0x0100 // Ring signal detected
707: #define EV_PERR 0x0200 // Printer error occured
708: #define EV_RX80FULL 0x0400 // Receive buffer is 80 percent full
709: #define EV_EVENT1 0x0800 // Provider specific event 1
710: #define EV_EVENT2 0x1000 // Provider specific event 2
711:
712: //
713: // Escape Functions
714: //
715:
716: #define SETXOFF 1 // Simulate XOFF received
717: #define SETXON 2 // Simulate XON received
718: #define SETRTS 3 // Set RTS high
719: #define CLRRTS 4 // Set RTS low
720: #define SETDTR 5 // Set DTR high
721: #define CLRDTR 6 // Set DTR low
722: #define RESETDEV 7 // Reset device if possible
723: #define SETBREAK 8 // Set the device break line.
724: #define CLRBREAK 9 // Clear the device break line.
725:
726: //
727: // PURGE function flags.
728: //
729: #define PURGE_TXABORT 0x0001 // Kill the pending/current writes to the comm port.
730: #define PURGE_RXABORT 0x0002 // Kill the pending/current reads to the comm port.
731: #define PURGE_TXCLEAR 0x0004 // Kill the transmit queue if there.
732: #define PURGE_RXCLEAR 0x0008 // Kill the typeahead buffer if there.
733:
734: #define LPTx 0x80 // Set if ID is for LPT device
735:
736: //
737: // Modem Status Flags
738: //
739: #define MS_CTS_ON ((DWORD)0x0010)
740: #define MS_DSR_ON ((DWORD)0x0020)
741: #define MS_RING_ON ((DWORD)0x0040)
742: #define MS_RLSD_ON ((DWORD)0x0080)
743:
744: //
745: // WaitSoundState() Constants
746: //
747:
748: #define S_QUEUEEMPTY 0
749: #define S_THRESHOLD 1
750: #define S_ALLTHRESHOLD 2
751:
752: //
753: // Accent Modes
754: //
755:
756: #define S_NORMAL 0
757: #define S_LEGATO 1
758: #define S_STACCATO 2
759:
760: //
761: // SetSoundNoise() Sources
762: //
763:
764: #define S_PERIOD512 0 // Freq = N/512 high pitch, less coarse hiss
765: #define S_PERIOD1024 1 // Freq = N/1024
766: #define S_PERIOD2048 2 // Freq = N/2048 low pitch, more coarse hiss
767: #define S_PERIODVOICE 3 // Source is frequency from voice channel (3)
768: #define S_WHITE512 4 // Freq = N/512 high pitch, less coarse hiss
769: #define S_WHITE1024 5 // Freq = N/1024
770: #define S_WHITE2048 6 // Freq = N/2048 low pitch, more coarse hiss
771: #define S_WHITEVOICE 7 // Source is frequency from voice channel (3)
772:
773: #define S_SERDVNA (-1) // Device not available
774: #define S_SEROFM (-2) // Out of memory
775: #define S_SERMACT (-3) // Music active
776: #define S_SERQFUL (-4) // Queue full
777: #define S_SERBDNT (-5) // Invalid note
778: #define S_SERDLN (-6) // Invalid note length
779: #define S_SERDCC (-7) // Invalid note count
780: #define S_SERDTP (-8) // Invalid tempo
781: #define S_SERDVL (-9) // Invalid volume
782: #define S_SERDMD (-10) // Invalid mode
783: #define S_SERDSH (-11) // Invalid shape
784: #define S_SERDPT (-12) // Invalid pitch
785: #define S_SERDFQ (-13) // Invalid frequency
786: #define S_SERDDR (-14) // Invalid duration
787: #define S_SERDSR (-15) // Invalid source
788: #define S_SERDST (-16) // Invalid state
789:
790: #define NMPWAIT_WAIT_FOREVER 0xffffffff
791: #define NMPWAIT_NOWAIT 0x00000001
792: #define NMPWAIT_USE_DEFAULT_WAIT 0x00000000
793:
794: #define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
795: #define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
796: #define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
797:
798: #define FILE_MAP_WRITE SECTION_MAP_WRITE
799: #define FILE_MAP_READ SECTION_MAP_READ
800: #define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS
801:
802: #define OF_READ 0x00000000
803: #define OF_WRITE 0x00000001
804: #define OF_READWRITE 0x00000002
805: #define OF_SHARE_COMPAT 0x00000000
806: #define OF_SHARE_EXCLUSIVE 0x00000010
807: #define OF_SHARE_DENY_WRITE 0x00000020
808: #define OF_SHARE_DENY_READ 0x00000030
809: #define OF_SHARE_DENY_NONE 0x00000040
810: #define OF_PARSE 0x00000100
811: #define OF_DELETE 0x00000200
812: #define OF_VERIFY 0x00000400
813: #define OF_CANCEL 0x00000800
814: #define OF_CREATE 0x00001000
815: #define OF_PROMPT 0x00002000
816: #define OF_EXIST 0x00004000
817: #define OF_REOPEN 0x00008000
818:
1.1.1.2 root 819: #define OFS_MAXPATHNAME 128
1.1 root 820: typedef struct _OFSTRUCT {
821: BYTE cBytes;
822: BYTE fFixedDisk;
823: WORD nErrCode;
824: WORD Reserved1;
825: WORD Reserved2;
1.1.1.2 root 826: BYTE szPathName[OFS_MAXPATHNAME];
1.1 root 827: } OFSTRUCT, *LPOFSTRUCT, *POFSTRUCT;
828:
829: LONG
1.1.1.2 root 830: WINAPI
1.1 root 831: InterlockedIncrement(
832: LPLONG lpAddend
833: );
834:
835: LONG
1.1.1.2 root 836: WINAPI
1.1 root 837: InterlockedDecrement(
838: LPLONG lpAddend
839: );
840:
1.1.1.2 root 841: BOOL
842: WINAPI
1.1 root 843: FreeResource(
1.1.1.2 root 844: HGLOBAL hResData
1.1 root 845: );
846:
1.1.1.2 root 847: LPVOID
848: WINAPI
1.1 root 849: LockResource(
1.1.1.2 root 850: HGLOBAL hResData
1.1 root 851: );
852:
853: #define UnlockResource(hResData) ((hResData), 0)
854: #define MAXINTATOM 0xC000
1.1.1.2 root 855: #define MAKEINTATOM(i) (LPTSTR)((DWORD)((WORD)(i)))
856: #define INVALID_ATOM ((ATOM)0)
1.1 root 857:
858: int
1.1.1.2 root 859: WINAPI
1.1 root 860: WinMain(
1.1.1.3 ! root 861: HINSTANCE hInstance,
! 862: HINSTANCE hPrevInstance,
1.1 root 863: LPSTR lpCmdLine,
864: int nShowCmd
865: );
866:
867: BOOL
1.1.1.2 root 868: WINAPI
1.1 root 869: FreeLibrary(
1.1.1.3 ! root 870: HINSTANCE hLibModule
1.1 root 871: );
872:
873: FARPROC
1.1.1.2 root 874: WINAPI
1.1 root 875: GetProcAddress(
1.1.1.3 ! root 876: HINSTANCE hModule,
1.1.1.2 root 877: LPCSTR lpProcName
1.1 root 878: );
879:
880: DWORD
1.1.1.2 root 881: WINAPI
1.1 root 882: GetVersion( VOID );
883:
1.1.1.2 root 884: HGLOBAL
885: WINAPI
1.1 root 886: GlobalAlloc(
1.1.1.2 root 887: UINT uFlags,
1.1 root 888: DWORD dwBytes
889: );
890:
1.1.1.2 root 891: HGLOBAL
892: WINAPI
1.1 root 893: GlobalReAlloc(
1.1.1.2 root 894: HGLOBAL hMem,
1.1 root 895: DWORD dwBytes,
1.1.1.2 root 896: UINT uFlags
1.1 root 897: );
898:
899: DWORD
1.1.1.2 root 900: WINAPI
1.1 root 901: GlobalSize(
1.1.1.2 root 902: HGLOBAL hMem
1.1 root 903: );
904:
1.1.1.2 root 905: UINT
906: WINAPI
1.1 root 907: GlobalFlags(
1.1.1.2 root 908: HGLOBAL hMem
1.1 root 909: );
910:
911:
1.1.1.2 root 912: LPVOID
913: WINAPI
1.1 root 914: GlobalLock(
1.1.1.2 root 915: HGLOBAL hMem
1.1 root 916: );
917:
1.1.1.2 root 918: //!!!MWH My version win31 = DWORD WINAPI GlobalHandle(UINT)
919: HGLOBAL
920: WINAPI
1.1 root 921: GlobalHandle(
1.1.1.2 root 922: LPVOID pMem
1.1 root 923: );
924:
925:
926: BOOL
1.1.1.2 root 927: WINAPI
1.1 root 928: GlobalUnlock(
1.1.1.2 root 929: HGLOBAL hMem
1.1 root 930: );
931:
932:
1.1.1.2 root 933: HGLOBAL
934: WINAPI
1.1 root 935: GlobalFree(
1.1.1.2 root 936: HGLOBAL hMem
937: );
938:
939: UINT
940: WINAPI
941: GlobalCompact(
942: DWORD dwMinFree
943: );
944:
945: VOID
946: WINAPI
947: GlobalFix(
948: HGLOBAL hMem
949: );
950:
951: VOID
952: WINAPI
953: GlobalUnfix(
954: HGLOBAL hMem
955: );
956:
957: LPVOID
958: WINAPI
959: GlobalWire(
960: HGLOBAL hMem
1.1 root 961: );
962:
1.1.1.2 root 963: BOOL
964: WINAPI
965: GlobalUnWire(
966: HGLOBAL hMem
967: );
1.1 root 968:
969: VOID
1.1.1.2 root 970: WINAPI
1.1 root 971: GlobalMemoryStatus(
972: LPMEMORYSTATUS lpBuffer
973: );
974:
1.1.1.2 root 975: HLOCAL
976: WINAPI
1.1 root 977: LocalAlloc(
1.1.1.2 root 978: UINT uFlags,
979: UINT uBytes
1.1 root 980: );
981:
1.1.1.2 root 982: HLOCAL
983: WINAPI
1.1 root 984: LocalReAlloc(
1.1.1.2 root 985: HLOCAL hMem,
986: UINT uBytes,
987: UINT uFlags
1.1 root 988: );
989:
1.1.1.2 root 990: LPVOID
991: WINAPI
1.1 root 992: LocalLock(
1.1.1.2 root 993: HLOCAL hMem
1.1 root 994: );
995:
1.1.1.2 root 996: HLOCAL
997: WINAPI
1.1 root 998: LocalHandle(
1.1.1.2 root 999: LPVOID pMem
1.1 root 1000: );
1001:
1002: BOOL
1.1.1.2 root 1003: WINAPI
1.1 root 1004: LocalUnlock(
1.1.1.2 root 1005: HLOCAL hMem
1.1 root 1006: );
1007:
1.1.1.2 root 1008: UINT
1009: WINAPI
1.1 root 1010: LocalSize(
1.1.1.2 root 1011: HLOCAL hMem
1.1 root 1012: );
1013:
1.1.1.2 root 1014: UINT
1015: WINAPI
1.1 root 1016: LocalFlags(
1.1.1.2 root 1017: HLOCAL hMem
1.1 root 1018: );
1019:
1.1.1.2 root 1020: HLOCAL
1021: WINAPI
1.1 root 1022: LocalFree(
1.1.1.2 root 1023: HLOCAL hMem
1024: );
1025:
1026: UINT
1027: WINAPI
1028: LocalShrink(
1029: HLOCAL hMem,
1030: UINT cbNewSize
1031: );
1032:
1033: UINT
1034: WINAPI
1035: LocalCompact(
1036: UINT uMinFree
1037: );
1038:
1039: BOOL
1040: WINAPI
1041: FlushInstructionCache(
1042: HANDLE hProcess,
1043: LPVOID lpBaseAddress,
1044: DWORD dwSize
1.1 root 1045: );
1046:
1047: LPVOID
1.1.1.2 root 1048: WINAPI
1.1 root 1049: VirtualAlloc(
1050: LPVOID lpAddress,
1051: DWORD dwSize,
1052: DWORD flAllocationType,
1053: DWORD flProtect
1054: );
1055:
1056: BOOL
1.1.1.2 root 1057: WINAPI
1.1 root 1058: VirtualFree(
1059: LPVOID lpAddress,
1060: DWORD dwSize,
1061: DWORD dwFreeType
1062: );
1063:
1064: BOOL
1.1.1.2 root 1065: WINAPI
1.1 root 1066: VirtualProtect(
1067: LPVOID lpAddress,
1068: DWORD dwSize,
1069: DWORD flNewProtect,
1070: PDWORD lpflOldProtect
1071: );
1072:
1073: DWORD
1.1.1.2 root 1074: WINAPI
1.1 root 1075: VirtualQuery(
1076: LPVOID lpAddress,
1077: PMEMORY_BASIC_INFORMATION lpBuffer,
1078: DWORD dwLength
1079: );
1080:
1.1.1.2 root 1081: BOOL
1082: WINAPI
1083: VirtualProtectEx(
1084: HANDLE hProcess,
1085: LPVOID lpAddress,
1086: DWORD dwSize,
1087: DWORD flNewProtect,
1088: PDWORD lpflOldProtect
1089: );
1090:
1091: DWORD
1092: WINAPI
1093: VirtualQueryEx(
1094: HANDLE hProcess,
1095: LPVOID lpAddress,
1096: PMEMORY_BASIC_INFORMATION lpBuffer,
1097: DWORD dwLength
1098: );
1099:
1.1 root 1100: HANDLE
1.1.1.2 root 1101: WINAPI
1.1 root 1102: HeapCreate(
1103: DWORD flOptions,
1104: DWORD dwInitialSize,
1105: DWORD dwMaximumSize
1106: );
1107:
1108: BOOL
1.1.1.2 root 1109: WINAPI
1.1 root 1110: HeapDestroy(
1111: HANDLE hHeap
1112: );
1113:
1114: LPSTR
1.1.1.2 root 1115: WINAPI
1.1 root 1116: HeapAlloc(
1117: HANDLE hHeap,
1118: DWORD dwBytes
1119: );
1120:
1121: BOOL
1.1.1.2 root 1122: WINAPI
1.1 root 1123: HeapFree(
1124: HANDLE hHeap,
1125: LPSTR lpMem
1126: );
1127:
1128: DWORD
1.1.1.2 root 1129: WINAPI
1.1 root 1130: HeapSize(
1131: HANDLE hHeap,
1132: LPSTR lpMem
1133: );
1134:
1135:
1136: HANDLE
1.1.1.2 root 1137: WINAPI
1.1 root 1138: OpenProcess(
1139: DWORD dwDesiredAccess,
1140: BOOL bInheritHandle,
1141: DWORD dwProcessId
1142: );
1143:
1144: HANDLE
1.1.1.2 root 1145: WINAPI
1.1 root 1146: GetCurrentProcess(
1147: VOID
1148: );
1149:
1150: DWORD
1.1.1.2 root 1151: WINAPI
1.1 root 1152: GetCurrentProcessId(
1153: VOID
1154: );
1155:
1156: VOID
1.1.1.2 root 1157: WINAPI
1.1 root 1158: ExitProcess(
1.1.1.2 root 1159: UINT uExitCode
1.1 root 1160: );
1161:
1162: BOOL
1.1.1.2 root 1163: WINAPI
1.1 root 1164: TerminateProcess(
1165: HANDLE hProcess,
1.1.1.2 root 1166: UINT uExitCode
1.1 root 1167: );
1168:
1169: BOOL
1.1.1.2 root 1170: WINAPI
1.1 root 1171: GetExitCodeProcess(
1172: HANDLE hProcess,
1173: LPDWORD lpExitCode
1174: );
1175:
1176:
1177: VOID
1.1.1.2 root 1178: WINAPI
1.1 root 1179: FatalExit(
1.1.1.2 root 1180: int ExitCode
1.1 root 1181: );
1182:
1183: LPVOID
1.1.1.2 root 1184: WINAPI
1.1 root 1185: GetEnvironmentStrings(
1186: VOID
1187: );
1188:
1189: VOID
1.1.1.2 root 1190: WINAPI
1.1 root 1191: RaiseException(
1192: DWORD dwExceptionCode,
1193: DWORD dwExceptionFlags,
1194: DWORD nNumberOfArguments,
1195: LPDWORD lpArguments
1196: );
1197:
1198: EXCEPTION_DISPOSITION
1.1.1.2 root 1199: WINAPI
1.1 root 1200: UnhandledExceptionFilter(
1201: struct _EXCEPTION_POINTERS *ExceptionInfo
1202: );
1203:
1204: HANDLE
1.1.1.2 root 1205: WINAPI
1.1 root 1206: CreateThread(
1207: LPSECURITY_ATTRIBUTES lpThreadAttributes,
1208: DWORD dwStackSize,
1209: LPTHREAD_START_ROUTINE lpStartAddress,
1210: LPVOID lpParameter,
1211: DWORD dwCreationFlags,
1212: LPDWORD lpThreadId
1213: );
1214:
1215: HANDLE
1.1.1.2 root 1216: WINAPI
1217: CreateRemoteThread(
1218: HANDLE hProcess,
1219: LPSECURITY_ATTRIBUTES lpThreadAttributes,
1220: DWORD dwStackSize,
1221: LPTHREAD_START_ROUTINE lpStartAddress,
1222: LPVOID lpParameter,
1223: DWORD dwCreationFlags,
1224: LPDWORD lpThreadId
1225: );
1226:
1227: HANDLE
1228: WINAPI
1.1 root 1229: GetCurrentThread(
1230: VOID
1231: );
1232:
1233: DWORD
1.1.1.2 root 1234: WINAPI
1.1 root 1235: GetCurrentThreadId(
1236: VOID
1237: );
1238:
1239: BOOL
1.1.1.2 root 1240: WINAPI
1.1 root 1241: SetThreadPriority(
1242: HANDLE hThread,
1243: int nPriority
1244: );
1245:
1246: int
1.1.1.2 root 1247: WINAPI
1.1 root 1248: GetThreadPriority(
1249: HANDLE hThread
1250: );
1251:
1252: VOID
1.1.1.2 root 1253: WINAPI
1.1 root 1254: ExitThread(
1255: DWORD dwExitCode
1256: );
1257:
1258: BOOL
1.1.1.2 root 1259: WINAPI
1.1 root 1260: TerminateThread(
1261: HANDLE hThread,
1262: DWORD dwExitCode
1263: );
1264:
1265: BOOL
1.1.1.2 root 1266: WINAPI
1.1 root 1267: GetExitCodeThread(
1268: HANDLE hThread,
1269: LPDWORD lpExitCode
1270: );
1271:
1272: BOOL
1.1.1.2 root 1273: WINAPI
1.1 root 1274: GetThreadSelectorEntry(
1275: HANDLE hThread,
1276: DWORD dwSelector,
1277: LPLDT_ENTRY lpSelectorEntry
1278: );
1279:
1280: DWORD
1.1.1.2 root 1281: WINAPI
1.1 root 1282: GetLastError(
1283: VOID
1284: );
1285:
1286: VOID
1.1.1.2 root 1287: WINAPI
1.1 root 1288: SetLastError(
1289: DWORD dwErrCode
1290: );
1291:
1.1.1.2 root 1292: //
1293: // SetLastErrorEx() types.
1294: //
1295: #define SLE_ERROR 0x00000001
1296: #define SLE_MINORERROR 0x00000002
1297: #define SLE_WARNING 0x00000003
1298:
1299: VOID
1.1.1.3 ! root 1300: WINAPI
1.1.1.2 root 1301: SetLastErrorEx(
1302: DWORD dwErrCode,
1303: DWORD dwType
1304: );
1305:
1.1 root 1306: BOOL
1.1.1.2 root 1307: WINAPI
1.1 root 1308: GetOverlappedResult(
1309: HANDLE hFile,
1310: LPOVERLAPPED lpOverlapped,
1311: LPDWORD lpNumberOfBytesTransferred,
1312: BOOL bWait
1313: );
1314:
1.1.1.2 root 1315: #define SEM_FAILCRITICALERRORS 0x0001
1316: #define SEM_NOGPFAULTERRORBOX 0x0002
1317: #define SEM_NOOPENFILEERRORBOX 0x8000
1318:
1319: VOID
1320: WINAPI
1321: SetDebugErrorLevel(
1322: DWORD dwLevel
1323: );
1324:
1325: UINT
1326: WINAPI
1.1 root 1327: SetErrorMode(
1.1.1.2 root 1328: UINT uMode
1.1 root 1329: );
1330:
1331:
1332: BOOL
1.1.1.2 root 1333: WINAPI
1.1 root 1334: ReadProcessMemory(
1335: HANDLE hProcess,
1336: LPVOID lpBaseAddress,
1337: LPVOID lpBuffer,
1338: DWORD nSize,
1339: LPDWORD lpNumberOfBytesRead
1340: );
1341:
1342: BOOL
1.1.1.2 root 1343: WINAPI
1.1 root 1344: WriteProcessMemory(
1345: HANDLE hProcess,
1346: LPVOID lpBaseAddress,
1347: LPVOID lpBuffer,
1348: DWORD nSize,
1349: LPDWORD lpNumberOfBytesWritten
1350: );
1351:
1352: BOOL
1.1.1.2 root 1353: WINAPI
1.1 root 1354: GetThreadContext(
1355: HANDLE hThread,
1356: LPCONTEXT lpContext
1357: );
1358:
1359: BOOL
1.1.1.2 root 1360: WINAPI
1.1 root 1361: SetThreadContext(
1362: HANDLE hThread,
1363: LPCONTEXT lpContext
1364: );
1365:
1366: DWORD
1.1.1.2 root 1367: WINAPI
1.1 root 1368: SuspendThread(
1369: HANDLE hThread
1370: );
1371:
1372: DWORD
1.1.1.2 root 1373: WINAPI
1.1 root 1374: ResumeThread(
1.1.1.2 root 1375: HANDLE hThread
1.1 root 1376: );
1377:
1378: VOID
1.1.1.2 root 1379: WINAPI
1.1 root 1380: DebugBreak(
1381: VOID
1382: );
1383:
1384: BOOL
1.1.1.2 root 1385: WINAPI
1.1 root 1386: WaitForDebugEvent(
1387: LPDEBUG_EVENT lpDebugEvent,
1388: DWORD dwMilliseconds
1389: );
1390:
1391: BOOL
1.1.1.2 root 1392: WINAPI
1.1 root 1393: ContinueDebugEvent(
1394: DWORD dwProcessId,
1395: DWORD dwThreadId,
1396: DWORD dwContinueStatus
1397: );
1398:
1399: BOOL
1.1.1.2 root 1400: WINAPI
1.1 root 1401: DebugActiveProcess(
1402: DWORD dwProcessId
1403: );
1404:
1.1.1.2 root 1405: HANDLE
1406: WINAPI
1407: DebugSnapShotProcessHeaps(
1408: DWORD dwProcessId
1409: );
1410:
1411: typedef struct _DEBUG_HEAP_BACKTRACE {
1412: DWORD Depth;
1413: DWORD ReturnAddresses[ 1 ];
1414: } DEBUG_HEAP_BACKTRACE, *PDEBUG_HEAP_BACKTRACE;
1415:
1416: typedef struct _DEBUG_HEAP_ALLOCATOR {
1417: DWORD TotalBytesAllocated;
1418: DWORD OffsetToBackTrace;
1419: } DEBUG_HEAP_ALLOCATOR, *PDEBUG_HEAP_ALLOCATOR;
1420:
1421: typedef struct _DEBUG_HEAP_ENTRY {
1422: DWORD Address;
1423: USHORT Size;
1424: USHORT Allocator;
1425: } DEBUG_HEAP_ENTRY, *PDEBUG_HEAP_ENTRY;
1426:
1427: #define DEBUG_HEAP_ENTRY_FREE (USHORT)-1
1428:
1429: typedef struct _DEBUG_HEAP_INFO {
1430: USHORT Creator;
1431: USHORT HeaderSizeLog2;
1432: USHORT ReservedPages;
1433: USHORT CommittedPages;
1434: USHORT AllocatorReservedPages;
1435: USHORT AllocatorCommittedPages;
1436: DWORD NumberOfEntries;
1437: DEBUG_HEAP_ENTRY Entries[ 1 ];
1438: } DEBUG_HEAP_INFO, *PDEBUG_HEAP_INFO;
1439:
1440: typedef struct _DEBUG_HEAP_DUMP {
1441: DWORD OffsetToAllocatorTable;
1442: DWORD NumberOfHeaps;
1443: DEBUG_HEAP_INFO HeapInfo[ 1 ];
1444: } DEBUG_HEAP_DUMP, *PDEBUG_HEAP_DUMP;
1445:
1.1 root 1446: VOID
1.1.1.2 root 1447: WINAPI
1.1 root 1448: InitializeCriticalSection(
1449: LPCRITICAL_SECTION lpCriticalSection
1450: );
1451:
1452: VOID
1.1.1.2 root 1453: WINAPI
1.1 root 1454: EnterCriticalSection(
1455: LPCRITICAL_SECTION lpCriticalSection
1456: );
1457:
1458: VOID
1.1.1.2 root 1459: WINAPI
1.1 root 1460: LeaveCriticalSection(
1461: LPCRITICAL_SECTION lpCriticalSection
1462: );
1463:
1464: VOID
1.1.1.2 root 1465: WINAPI
1.1 root 1466: DeleteCriticalSection(
1467: LPCRITICAL_SECTION lpCriticalSection
1468: );
1469:
1470: BOOL
1.1.1.2 root 1471: WINAPI
1.1 root 1472: SetEvent(
1473: HANDLE hEvent
1474: );
1475:
1476: BOOL
1.1.1.2 root 1477: WINAPI
1.1 root 1478: ResetEvent(
1479: HANDLE hEvent
1480: );
1481:
1482: BOOL
1.1.1.2 root 1483: WINAPI
1.1 root 1484: PulseEvent(
1485: HANDLE hEvent
1486: );
1487:
1488: BOOL
1.1.1.2 root 1489: WINAPI
1.1 root 1490: ReleaseSemaphore(
1491: HANDLE hSemaphore,
1492: LONG lReleaseCount,
1493: LPLONG lpPreviousCount
1494: );
1495:
1496: BOOL
1.1.1.2 root 1497: WINAPI
1.1 root 1498: ReleaseMutex(
1499: HANDLE hMutex
1500: );
1501:
1502: DWORD
1.1.1.2 root 1503: WINAPI
1.1 root 1504: WaitForSingleObject(
1505: HANDLE hHandle,
1506: DWORD dwMilliseconds
1507: );
1508:
1509: DWORD
1.1.1.2 root 1510: WINAPI
1.1 root 1511: WaitForMultipleObjects(
1512: DWORD nCount,
1513: LPHANDLE lpHandles,
1514: BOOL bWaitAll,
1515: DWORD dwMilliseconds
1516: );
1517:
1518: VOID
1.1.1.2 root 1519: WINAPI
1.1 root 1520: Sleep(
1521: DWORD dwMilliseconds
1522: );
1523:
1.1.1.2 root 1524: HRSRC
1525: WINAPI
1.1 root 1526: LoadResource(
1.1.1.3 ! root 1527: HINSTANCE hModule,
1.1.1.2 root 1528: HRSRC hResInfo
1.1 root 1529: );
1530:
1531: DWORD
1.1.1.2 root 1532: WINAPI
1.1 root 1533: SizeofResource(
1.1.1.3 ! root 1534: HINSTANCE hModule,
1.1.1.2 root 1535: HRSRC hResInfo
1.1 root 1536: );
1537:
1.1.1.3 ! root 1538:
! 1539: BOOLEAN
! 1540: CloseProfileUserMapping( VOID );
! 1541:
! 1542: BOOLEAN
! 1543: OpenProfileUserMapping( VOID );
! 1544:
! 1545:
1.1 root 1546: ATOM
1.1.1.2 root 1547: WINAPI
1.1 root 1548: GlobalDeleteAtom(
1549: ATOM nAtom
1550: );
1551:
1552: BOOL
1.1.1.2 root 1553: WINAPI
1.1 root 1554: InitAtomTable(
1555: DWORD nSize
1556: );
1557:
1558: ATOM
1.1.1.2 root 1559: WINAPI
1.1 root 1560: DeleteAtom(
1561: ATOM nAtom
1562: );
1563:
1.1.1.2 root 1564: UINT
1565: WINAPI
1.1 root 1566: SetHandleCount(
1.1.1.2 root 1567: UINT uNumber
1.1 root 1568: );
1569:
1570: DWORD
1.1.1.2 root 1571: WINAPI
1.1 root 1572: GetLogicalDrives(
1573: VOID
1574: );
1575:
1576: BOOL
1.1.1.2 root 1577: WINAPI
1.1 root 1578: LockFile(
1579: HANDLE hFile,
1580: DWORD dwFileOffsetLow,
1.1.1.2 root 1581: DWORD dwFileOffsetHigh,
1582: DWORD nNumberOfBytesToLockLow,
1583: DWORD nNumberOfBytesToLockHigh
1.1 root 1584: );
1585:
1586: BOOL
1.1.1.2 root 1587: WINAPI
1.1 root 1588: UnlockFile(
1589: HANDLE hFile,
1590: DWORD dwFileOffsetLow,
1.1.1.2 root 1591: DWORD dwFileOffsetHigh,
1592: DWORD nNumberOfBytesToUnlockLow,
1593: DWORD nNumberOfBytesToUnlockHigh
1594: );
1595:
1596: typedef struct _BY_HANDLE_FILE_INFORMATION {
1597: DWORD dwFileAttributes;
1598: FILETIME ftCreationTime;
1599: FILETIME ftLastAccessTime;
1600: FILETIME ftLastWriteTime;
1601: DWORD dwVolumeSerialNumber;
1602: DWORD nFileSizeHigh;
1603: DWORD nFileSizeLow;
1604: DWORD nNumberOfLinks;
1605: DWORD nFileIndexHigh;
1606: DWORD nFileIndexLow;
1607: } BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_INFORMATION;
1608:
1609: BOOL
1610: WINAPI
1611: GetFileInformationByHandle(
1612: HANDLE hFile,
1613: LPBY_HANDLE_FILE_INFORMATION lpFileInformation
1.1 root 1614: );
1615:
1616: DWORD
1.1.1.2 root 1617: WINAPI
1.1 root 1618: GetFileType(
1619: HANDLE hFile
1620: );
1621:
1622: DWORD
1.1.1.2 root 1623: WINAPI
1.1 root 1624: GetFileSize(
1625: HANDLE hFile,
1626: LPDWORD lpFileSizeHigh
1627: );
1628:
1629: HANDLE
1.1.1.2 root 1630: WINAPI
1.1 root 1631: GetStdHandle(
1632: DWORD nStdHandle
1633: );
1634:
1635: BOOL
1.1.1.2 root 1636: WINAPI
1.1 root 1637: SetStdHandle(
1638: DWORD nStdHandle,
1639: HANDLE hHandle
1640: );
1641:
1642: BOOL
1.1.1.2 root 1643: WINAPI
1.1 root 1644: WriteFile(
1645: HANDLE hFile,
1.1.1.2 root 1646: CONST VOID *lpBuffer,
1.1 root 1647: DWORD nNumberOfBytesToWrite,
1648: LPDWORD lpNumberOfBytesWritten,
1649: LPOVERLAPPED lpOverlapped
1650: );
1651:
1652: BOOL
1.1.1.2 root 1653: WINAPI
1.1 root 1654: ReadFile(
1655: HANDLE hFile,
1656: LPVOID lpBuffer,
1657: DWORD nNumberOfBytesToRead,
1658: LPDWORD lpNumberOfBytesRead,
1659: LPOVERLAPPED lpOverlapped
1660: );
1661:
1662: BOOL
1.1.1.2 root 1663: WINAPI
1.1 root 1664: FlushFileBuffers(
1665: HANDLE hFile
1666: );
1667:
1668: BOOL
1.1.1.2 root 1669: WINAPI
1670: DeviceIoControl(
1671: HANDLE hDevice,
1672: DWORD dwIoControlCode,
1673: LPVOID lpInBuffer,
1674: DWORD nInBufferSize,
1675: LPVOID lpOutBuffer,
1676: DWORD nOutBufferSize,
1677: LPDWORD lpBytesReturned,
1678: LPOVERLAPPED lpOverlapped
1679: );
1680:
1681: BOOL
1682: WINAPI
1.1 root 1683: SetEndOfFile(
1684: HANDLE hFile
1685: );
1686:
1687: DWORD
1.1.1.2 root 1688: WINAPI
1.1 root 1689: SetFilePointer(
1690: HANDLE hFile,
1691: LONG lDistanceToMove,
1692: PLONG lpDistanceToMoveHigh,
1693: DWORD dwMoveMethod
1694: );
1695:
1696: BOOL
1.1.1.2 root 1697: WINAPI
1.1 root 1698: FindClose(
1699: HANDLE hFindFile
1700: );
1701:
1702: BOOL
1.1.1.2 root 1703: WINAPI
1.1 root 1704: GetFileTime(
1705: HANDLE hFile,
1706: LPFILETIME lpCreationTime,
1707: LPFILETIME lpLastAccessTime,
1708: LPFILETIME lpLastWriteTime
1709: );
1710:
1711: BOOL
1.1.1.2 root 1712: WINAPI
1.1 root 1713: SetFileTime(
1714: HANDLE hFile,
1715: LPFILETIME lpCreationTime,
1716: LPFILETIME lpLastAccessTime,
1717: LPFILETIME lpLastWriteTime
1718: );
1719:
1720: BOOL
1.1.1.2 root 1721: WINAPI
1.1 root 1722: CloseHandle(
1723: HANDLE hObject
1724: );
1725:
1726: BOOL
1.1.1.2 root 1727: WINAPI
1.1 root 1728: DuplicateHandle(
1729: HANDLE hSourceProcessHandle,
1730: HANDLE hSourceHandle,
1731: HANDLE hTargetProcessHandle,
1732: LPHANDLE lpTargetHandle,
1733: DWORD dwDesiredAccess,
1734: BOOL bInheritHandle,
1735: DWORD dwOptions
1736: );
1737:
1738: DWORD
1.1.1.2 root 1739: WINAPI
1.1 root 1740: LoadModule(
1.1.1.2 root 1741: LPCSTR lpModuleName,
1.1 root 1742: LPVOID lpParameterBlock
1743: );
1744:
1.1.1.2 root 1745: UINT
1746: WINAPI
1.1 root 1747: WinExec(
1.1.1.2 root 1748: LPCSTR lpCmdLine,
1749: UINT uCmdShow
1.1 root 1750: );
1751:
1752: BOOL
1.1.1.2 root 1753: WINAPI
1.1 root 1754: BuildCommDCB(
1755: LPSTR lpDef,
1756: LPDCB lpDCB
1757: );
1758:
1759: BOOL
1.1.1.2 root 1760: WINAPI
1.1 root 1761: ClearCommBreak(
1762: HANDLE hFile
1763: );
1764:
1765: BOOL
1.1.1.2 root 1766: WINAPI
1.1 root 1767: ClearCommError(
1768: HANDLE hFile,
1769: LPDWORD lpErrors,
1770: LPCOMSTAT lpStat
1771: );
1772:
1773: BOOL
1.1.1.2 root 1774: WINAPI
1.1 root 1775: SetupComm(
1776: HANDLE hFile,
1777: DWORD dwInQueue,
1778: DWORD dwOutQueue
1779: );
1780:
1781: BOOL
1.1.1.2 root 1782: WINAPI
1.1 root 1783: EscapeCommFunction(
1784: HANDLE hFile,
1785: DWORD dwFunc
1786: );
1787:
1788: BOOL
1.1.1.2 root 1789: WINAPI
1790: GetCommMask(
1.1 root 1791: HANDLE hFile,
1.1.1.2 root 1792: LPDWORD lpEvtMask
1.1 root 1793: );
1794:
1795: BOOL
1.1.1.2 root 1796: WINAPI
1797: GetCommProperties(
1.1 root 1798: HANDLE hFile,
1.1.1.2 root 1799: LPCOMMPROP lpCommProp
1.1 root 1800: );
1801:
1802: BOOL
1.1.1.2 root 1803: WINAPI
1.1 root 1804: GetCommModemStatus(
1805: HANDLE hFile,
1806: LPDWORD lpModemStat
1807: );
1808:
1809: BOOL
1.1.1.2 root 1810: WINAPI
1.1 root 1811: GetCommState(
1812: HANDLE hFile,
1813: LPDCB lpDCB
1814: );
1815:
1816: BOOL
1.1.1.2 root 1817: WINAPI
1.1 root 1818: GetCommTimeouts(
1819: HANDLE hFile,
1820: LPCOMMTIMEOUTS lpCommTimeouts
1821: );
1822:
1823: BOOL
1.1.1.2 root 1824: WINAPI
1.1 root 1825: PurgeComm(
1826: HANDLE hFile,
1827: DWORD dwFlags
1828: );
1829:
1830: BOOL
1.1.1.2 root 1831: WINAPI
1.1 root 1832: SetCommBreak(
1833: HANDLE hFile
1834: );
1835:
1836: BOOL
1.1.1.2 root 1837: WINAPI
1.1 root 1838: SetCommMask(
1839: HANDLE hFile,
1840: DWORD dwEvtMask
1841: );
1842:
1843: BOOL
1.1.1.2 root 1844: WINAPI
1.1 root 1845: SetCommState(
1846: HANDLE hFile,
1847: LPDCB lpDCB
1848: );
1849:
1850: BOOL
1.1.1.2 root 1851: WINAPI
1.1 root 1852: SetCommTimeouts(
1853: HANDLE hFile,
1854: LPCOMMTIMEOUTS lpCommTimeouts
1855: );
1856:
1857: BOOL
1.1.1.2 root 1858: WINAPI
1.1 root 1859: TransmitCommChar(
1860: HANDLE hFile,
1861: char cChar
1862: );
1863:
1864: BOOL
1.1.1.2 root 1865: WINAPI
1.1 root 1866: WaitCommEvent(
1867: HANDLE hFile,
1868: LPDWORD lpEvtMask,
1.1.1.2 root 1869: LPOVERLAPPED lpOverlapped
1870: );
1871:
1872:
1873: DWORD
1874: WINAPI
1875: SetTapePosition(
1876: HANDLE hDevice,
1877: DWORD dwPositionMethod,
1878: DWORD dwPartition,
1.1.1.3 ! root 1879: DWORD dwOffsetLow,
! 1880: DWORD dwOffsetHigh
1.1.1.2 root 1881: );
1882:
1883: DWORD
1884: WINAPI
1885: GetTapePosition(
1886: HANDLE hDevice,
1.1.1.3 ! root 1887: DWORD dwPositionType,
! 1888: LPDWORD lpdwPartition,
! 1889: LPDWORD lpdwOffsetLow,
! 1890: LPDWORD lpdwOffsetHigh
1.1.1.2 root 1891: );
1892:
1893: DWORD
1894: WINAPI
1895: PrepareTape(
1896: HANDLE hDevice,
1.1.1.3 ! root 1897: DWORD dwOperation
1.1.1.2 root 1898: );
1899:
1900: DWORD
1901: WINAPI
1902: EraseTape(
1903: HANDLE hDevice,
1.1.1.3 ! root 1904: DWORD dwEraseType
1.1.1.2 root 1905: );
1906:
1907: DWORD
1.1.1.3 ! root 1908: WINAPI
1.1.1.2 root 1909: CreateTapePartition(
1910: HANDLE hDevice,
1.1.1.3 ! root 1911: DWORD dwPartitionMethod,
! 1912: DWORD dwCount,
! 1913: DWORD dwSize
1.1.1.2 root 1914: );
1915:
1916: DWORD
1917: WINAPI
1918: WriteTapemark(
1919: HANDLE hDevice,
1920: DWORD dwTapemarkType,
1.1.1.3 ! root 1921: DWORD dwTapemarkCount
1.1.1.2 root 1922: );
1923:
1924: DWORD
1925: WINAPI
1926: GetTapeStatus(
1.1.1.3 ! root 1927: HANDLE hDevice
1.1.1.2 root 1928: );
1929:
1930: DWORD
1931: WINAPI
1932: GetTapeParameters(
1933: HANDLE hDevice,
1934: DWORD dwOperation,
1.1.1.3 ! root 1935: LPDWORD lpdwSize,
! 1936: LPVOID lpTapeInformation
1.1.1.2 root 1937: );
1938:
1939: #define GET_TAPE_MEDIA_INFORMATION 0
1940: #define GET_TAPE_DRIVE_INFORMATION 1
1941:
1942: DWORD
1943: WINAPI
1944: SetTapeParameters(
1945: HANDLE hDevice,
1946: DWORD dwOperation,
1.1.1.3 ! root 1947: LPVOID lpTapeInformation
1.1 root 1948: );
1949:
1.1.1.2 root 1950: #define SET_TAPE_MEDIA_INFORMATION 0
1951: #define SET_TAPE_DRIVE_INFORMATION 1
1952:
1.1 root 1953: BOOL
1.1.1.2 root 1954: WINAPI
1.1 root 1955: Beep(
1956: DWORD dwFreq,
1957: DWORD dwDuration
1958: );
1959:
1960: VOID
1.1.1.2 root 1961: WINAPI
1.1 root 1962: OpenSound(
1963: VOID
1964: );
1965:
1966: VOID
1.1.1.2 root 1967: WINAPI
1.1 root 1968: CloseSound(
1969: VOID
1970: );
1971:
1972: VOID
1.1.1.2 root 1973: WINAPI
1.1 root 1974: StartSound(
1975: VOID
1976: );
1977:
1978: VOID
1.1.1.2 root 1979: WINAPI
1.1 root 1980: StopSound(
1981: VOID
1982: );
1983:
1984: DWORD
1.1.1.2 root 1985: WINAPI
1.1 root 1986: WaitSoundState(
1987: DWORD nState
1988: );
1989:
1990: DWORD
1.1.1.2 root 1991: WINAPI
1.1 root 1992: SyncAllVoices(
1993: VOID
1994: );
1995:
1996: DWORD
1.1.1.2 root 1997: WINAPI
1.1 root 1998: CountVoiceNotes(
1999: DWORD nVoice
2000: );
2001:
2002: LPDWORD
1.1.1.2 root 2003: WINAPI
1.1 root 2004: GetThresholdEvent(
2005: VOID
2006: );
2007:
2008: DWORD
1.1.1.2 root 2009: WINAPI
1.1 root 2010: GetThresholdStatus(
2011: VOID
2012: );
2013:
2014: DWORD
1.1.1.2 root 2015: WINAPI
1.1 root 2016: SetSoundNoise(
2017: DWORD nSource,
2018: DWORD nDuration
2019: );
2020:
2021: DWORD
1.1.1.2 root 2022: WINAPI
1.1 root 2023: SetVoiceAccent(
2024: DWORD nVoice,
2025: DWORD nTempo,
2026: DWORD nVolume,
2027: DWORD nMode,
2028: DWORD nPitch
2029: );
2030:
2031: DWORD
1.1.1.2 root 2032: WINAPI
1.1 root 2033: SetVoiceEnvelope(
2034: DWORD nVoice,
2035: DWORD nShape,
2036: DWORD nRepeat
2037: );
2038:
2039: DWORD
1.1.1.2 root 2040: WINAPI
1.1 root 2041: SetVoiceNote(
2042: DWORD nVoice,
2043: DWORD nValue,
2044: DWORD nLength,
2045: DWORD nCdots
2046: );
2047:
2048: DWORD
1.1.1.2 root 2049: WINAPI
1.1 root 2050: SetVoiceQueueSize(
2051: DWORD nVoice,
2052: DWORD nBytes
2053: );
2054:
2055: DWORD
1.1.1.2 root 2056: WINAPI
1.1 root 2057: SetVoiceSound(
2058: DWORD nVoice,
1.1.1.2 root 2059: DWORD Frequency,
1.1 root 2060: DWORD nDuration
2061: );
2062:
2063: DWORD
1.1.1.2 root 2064: WINAPI
1.1 root 2065: SetVoiceThreshold(
2066: DWORD nVoice,
2067: DWORD nNotes
2068: );
2069:
2070: int
1.1.1.2 root 2071: WINAPI
1.1 root 2072: MulDiv(
2073: int nNumber,
2074: int nNumerator,
2075: int nDenominator
2076: );
2077:
2078: VOID
1.1.1.2 root 2079: WINAPI
1.1 root 2080: GetSystemTime(
2081: LPSYSTEMTIME lpSystemTime
2082: );
2083:
2084: BOOL
1.1.1.2 root 2085: WINAPI
1.1 root 2086: SetSystemTime(
2087: LPSYSTEMTIME lpSystemTime
2088: );
2089:
2090: VOID
1.1.1.2 root 2091: WINAPI
1.1.1.3 ! root 2092: GetLocalTime(
! 2093: LPSYSTEMTIME lpSystemTime
! 2094: );
! 2095:
! 2096: BOOL
! 2097: WINAPI
! 2098: SetLocalTime(
! 2099: LPSYSTEMTIME lpSystemTime
! 2100: );
! 2101:
! 2102: VOID
! 2103: WINAPI
1.1 root 2104: GetSystemInfo(
2105: LPSYSTEM_INFO lpSystemInfo
2106: );
2107:
1.1.1.3 ! root 2108: typedef struct _TIME_ZONE_INFORMATION {
! 2109: LONG Bias;
! 2110: WCHAR StandardName[ 32 ];
! 2111: SYSTEMTIME StandardDate;
! 2112: LONG StandardBias;
! 2113: WCHAR DaylightName[ 32 ];
! 2114: SYSTEMTIME DaylightDate;
! 2115: LONG DaylightBias;
! 2116: } TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
! 2117:
! 2118:
! 2119: DWORD
! 2120: WINAPI
! 2121: GetTimeZoneInformation(
! 2122: LPTIME_ZONE_INFORMATION lpTimeZoneInformation
! 2123: );
! 2124:
! 2125: BOOL
! 2126: WINAPI
! 2127: SetTimeZoneInformation(
! 2128: LPTIME_ZONE_INFORMATION lpTimeZoneInformation
! 2129: );
1.1 root 2130:
2131: //
2132: // Routines to convert back and forth between system time and file time
2133: //
2134:
2135: BOOL
1.1.1.2 root 2136: WINAPI
1.1 root 2137: SystemTimeToFileTime(
2138: LPSYSTEMTIME lpSystemTime,
2139: LPFILETIME lpFileTime
2140: );
2141:
2142: BOOL
1.1.1.2 root 2143: WINAPI
1.1.1.3 ! root 2144: FileTimeToLocalFileTime(
! 2145: LPFILETIME lpFileTime,
! 2146: LPFILETIME lpLocalFileTime
! 2147: );
! 2148:
! 2149: BOOL
! 2150: WINAPI
! 2151: LocalFileTimeToFileTime(
! 2152: LPFILETIME lpLocalFileTime,
! 2153: LPFILETIME lpFileTime
! 2154: );
! 2155:
! 2156: BOOL
! 2157: WINAPI
1.1 root 2158: FileTimeToSystemTime(
2159: LPFILETIME lpFileTime,
2160: LPSYSTEMTIME lpSystemTime
2161: );
2162:
2163: LONG
1.1.1.2 root 2164: WINAPI
1.1 root 2165: CompareFileTime(
2166: LPFILETIME lpFileTime1,
2167: LPFILETIME lpFileTime2
2168: );
2169:
2170: BOOL
1.1.1.2 root 2171: WINAPI
1.1 root 2172: FileTimeToDosDateTime(
2173: LPFILETIME lpFileTime,
2174: LPWORD lpFatDate,
2175: LPWORD lpFatTime
2176: );
2177:
2178: BOOL
1.1.1.2 root 2179: WINAPI
1.1 root 2180: DosDateTimeToFileTime(
2181: WORD wFatDate,
2182: WORD wFatTime,
2183: LPFILETIME lpFileTime
2184: );
2185:
2186: DWORD
1.1.1.2 root 2187: WINAPI
1.1 root 2188: GetTickCount(
2189: VOID
2190: );
2191:
2192: DWORD
1.1.1.2 root 2193: WINAPI
1.1.1.3 ! root 2194: FormatMessageA(
1.1 root 2195: DWORD dwFlags,
2196: LPVOID lpSource,
2197: DWORD dwMessageId,
2198: DWORD dwLanguageId,
2199: LPSTR lpBuffer,
2200: DWORD nSize,
2201: LPVOID lpArguments
2202: );
1.1.1.3 ! root 2203: DWORD
! 2204: WINAPI
! 2205: FormatMessageW(
! 2206: DWORD dwFlags,
! 2207: LPVOID lpSource,
! 2208: DWORD dwMessageId,
! 2209: DWORD dwLanguageId,
! 2210: LPWSTR lpBuffer,
! 2211: DWORD nSize,
! 2212: LPVOID lpArguments
! 2213: );
! 2214: #ifdef UNICODE
! 2215: #define FormatMessage FormatMessageW
! 2216: #else
! 2217: #define FormatMessage FormatMessageA
! 2218: #endif // !UNICODE
1.1 root 2219:
2220: #define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
2221: #define FORMAT_MESSAGE_IGNORE_INSERTS 0x00000200
2222: #define FORMAT_MESSAGE_FROM_STRING 0x00000400
2223: #define FORMAT_MESSAGE_FROM_HMODULE 0x00000800
2224: #define FORMAT_MESSAGE_FROM_SYSTEM 0x00001000
2225: #define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF
2226:
2227:
2228: BOOL
1.1.1.2 root 2229: WINAPI
1.1 root 2230: CreatePipe(
2231: PHANDLE hReadPipe,
2232: PHANDLE hWritePipe,
2233: LPSECURITY_ATTRIBUTES lpPipeAttributes,
2234: DWORD nSize
2235: );
2236:
2237: BOOL
1.1.1.2 root 2238: WINAPI
1.1 root 2239: ConnectNamedPipe(
2240: HANDLE hNamedPipe,
2241: LPOVERLAPPED lpOverlapped
2242: );
2243:
2244: BOOL
1.1.1.2 root 2245: WINAPI
1.1 root 2246: DisconnectNamedPipe(
2247: HANDLE hNamedPipe
2248: );
2249:
2250: BOOL
1.1.1.2 root 2251: WINAPI
1.1 root 2252: SetNamedPipeHandleState(
2253: HANDLE hNamedPipe,
2254: LPDWORD lpMode,
2255: LPDWORD lpMaxCollectionCount,
2256: LPDWORD lpCollectDataTimeout
2257: );
2258:
2259: BOOL
1.1.1.2 root 2260: WINAPI
1.1 root 2261: GetNamedPipeInfo(
2262: HANDLE hNamedPipe,
2263: LPDWORD lpFlags,
2264: LPDWORD lpOutBufferSize,
2265: LPDWORD lpInBufferSize,
2266: LPDWORD lpMaxInstances
2267: );
2268:
2269: BOOL
1.1.1.2 root 2270: WINAPI
1.1 root 2271: PeekNamedPipe(
2272: HANDLE hNamedPipe,
2273: LPVOID lpBuffer,
2274: DWORD nBufferSize,
2275: LPDWORD lpBytesRead,
2276: LPDWORD lpTotalBytesAvail,
2277: LPDWORD lpBytesLeftThisMessage
2278: );
2279:
2280: BOOL
1.1.1.2 root 2281: WINAPI
1.1 root 2282: TransactNamedPipe(
2283: HANDLE hNamedPipe,
2284: LPVOID lpInBuffer,
2285: DWORD nInBufferSize,
2286: LPVOID lpOutBuffer,
2287: DWORD nOutBufferSize,
2288: LPDWORD lpBytesRead,
2289: LPOVERLAPPED lpOverlapped
2290: );
2291:
2292: HANDLE
1.1.1.2 root 2293: WINAPI
1.1 root 2294: CreateMailslotA(
1.1.1.2 root 2295: LPSTR lpName,
2296: DWORD nMaxMessageSize,
2297: DWORD lReadTimeout,
2298: LPSECURITY_ATTRIBUTES lpSecurityAttributes
1.1 root 2299: );
2300: HANDLE
1.1.1.2 root 2301: WINAPI
1.1 root 2302: CreateMailslotW(
1.1.1.2 root 2303: LPWSTR lpName,
2304: DWORD nMaxMessageSize,
2305: DWORD lReadTimeout,
2306: LPSECURITY_ATTRIBUTES lpSecurityAttributes
1.1 root 2307: );
2308: #ifdef UNICODE
2309: #define CreateMailslot CreateMailslotW
2310: #else
2311: #define CreateMailslot CreateMailslotA
2312: #endif // !UNICODE
2313:
2314: BOOL
1.1.1.2 root 2315: WINAPI
1.1 root 2316: GetMailslotInfo(
1.1.1.2 root 2317: HANDLE hMailslot,
2318: LPDWORD lpMaxMessageSize,
2319: LPDWORD lpNextSize,
2320: LPDWORD lpMessageCount,
2321: LPDWORD lpReadTimeout
1.1 root 2322: );
2323:
2324: BOOL
1.1.1.2 root 2325: WINAPI
1.1 root 2326: SetMailslotInfo(
1.1.1.2 root 2327: HANDLE hMailslot,
2328: DWORD lReadTimeout
1.1 root 2329: );
2330:
2331: LPVOID
1.1.1.2 root 2332: WINAPI
1.1 root 2333: MapViewOfFile(
2334: HANDLE hFileMappingObject,
2335: DWORD dwDesiredAccess,
2336: DWORD dwFileOffsetHigh,
2337: DWORD dwFileOffsetLow,
2338: DWORD dwNumberOfBytesToMap
2339: );
2340:
2341: BOOL
1.1.1.2 root 2342: WINAPI
1.1 root 2343: FlushViewOfFile(
2344: LPVOID lpBaseAddress,
2345: DWORD dwNumberOfBytesToFlush
2346: );
2347:
2348: BOOL
1.1.1.2 root 2349: WINAPI
1.1 root 2350: UnmapViewOfFile(
2351: LPVOID lpBaseAddress
2352: );
2353:
2354: //
2355: // _l Compat Functions
2356: //
2357:
2358: int
1.1.1.2 root 2359: WINAPI
2360: lstrcmpA(
2361: LPCSTR lpString1,
2362: LPCSTR lpString2
1.1 root 2363: );
1.1.1.2 root 2364: int
2365: WINAPI
2366: lstrcmpW(
2367: LPCWSTR lpString1,
2368: LPCWSTR lpString2
2369: );
2370: #ifdef UNICODE
2371: #define lstrcmp lstrcmpW
2372: #else
2373: #define lstrcmp lstrcmpA
2374: #endif // !UNICODE
1.1 root 2375:
2376: int
1.1.1.2 root 2377: WINAPI
2378: lstrcmpiA(
2379: LPCSTR lpString1,
2380: LPCSTR lpString2
2381: );
2382: int
2383: WINAPI
2384: lstrcmpiW(
2385: LPCWSTR lpString1,
2386: LPCWSTR lpString2
1.1 root 2387: );
1.1.1.2 root 2388: #ifdef UNICODE
2389: #define lstrcmpi lstrcmpiW
2390: #else
2391: #define lstrcmpi lstrcmpiA
2392: #endif // !UNICODE
1.1 root 2393:
2394: LPSTR
1.1.1.2 root 2395: WINAPI
2396: lstrcpyA(
1.1 root 2397: LPSTR lpString1,
1.1.1.2 root 2398: LPCSTR lpString2
2399: );
2400: LPWSTR
2401: WINAPI
2402: lstrcpyW(
2403: LPWSTR lpString1,
2404: LPCWSTR lpString2
1.1 root 2405: );
1.1.1.2 root 2406: #ifdef UNICODE
2407: #define lstrcpy lstrcpyW
2408: #else
2409: #define lstrcpy lstrcpyA
2410: #endif // !UNICODE
1.1 root 2411:
2412: LPSTR
1.1.1.2 root 2413: WINAPI
2414: lstrcatA(
1.1 root 2415: LPSTR lpString1,
1.1.1.2 root 2416: LPCSTR lpString2
1.1 root 2417: );
1.1.1.2 root 2418: LPWSTR
2419: WINAPI
2420: lstrcatW(
2421: LPWSTR lpString1,
2422: LPCWSTR lpString2
2423: );
2424: #ifdef UNICODE
2425: #define lstrcat lstrcatW
2426: #else
2427: #define lstrcat lstrcatA
2428: #endif // !UNICODE
1.1 root 2429:
2430: int
1.1.1.2 root 2431: WINAPI
2432: lstrlenA(
2433: LPCSTR lpString
1.1 root 2434: );
2435: int
1.1.1.2 root 2436: WINAPI
2437: lstrlenW(
2438: LPCWSTR lpString
1.1 root 2439: );
1.1.1.2 root 2440: #ifdef UNICODE
2441: #define lstrlen lstrlenW
2442: #else
2443: #define lstrlen lstrlenA
2444: #endif // !UNICODE
1.1 root 2445:
1.1.1.2 root 2446: HFILE
2447: WINAPI
2448: OpenFile(
2449: LPCSTR lpFileName,
1.1 root 2450: LPOFSTRUCT lpReOpenBuff,
1.1.1.2 root 2451: UINT uStyle
1.1 root 2452: );
2453:
1.1.1.2 root 2454: HFILE
2455: WINAPI
1.1 root 2456: _lopen(
1.1.1.2 root 2457: LPCSTR lpPathName,
1.1 root 2458: int iReadWrite
2459: );
2460:
1.1.1.2 root 2461: HFILE
2462: WINAPI
1.1 root 2463: _lcreat(
1.1.1.2 root 2464: LPCSTR lpPathName,
2465: int iAttribute
1.1 root 2466: );
2467:
1.1.1.2 root 2468: UINT
2469: WINAPI
1.1 root 2470: _lread(
1.1.1.2 root 2471: HFILE hFile,
2472: LPVOID lpBuffer,
2473: UINT uBytes
1.1 root 2474: );
2475:
1.1.1.2 root 2476: UINT
2477: WINAPI
1.1 root 2478: _lwrite(
1.1.1.2 root 2479: HFILE hFile,
2480: LPCSTR lpBuffer,
2481: UINT uBytes
1.1 root 2482: );
2483:
1.1.1.2 root 2484: HFILE
2485: WINAPI
1.1 root 2486: _lclose(
1.1.1.2 root 2487: HFILE hFile
1.1 root 2488: );
2489:
1.1.1.2 root 2490: LONG
2491: WINAPI
1.1 root 2492: _llseek(
1.1.1.2 root 2493: HFILE hFile,
2494: LONG lOffset,
1.1 root 2495: int iOrigin
2496: );
2497:
2498: DWORD
1.1.1.2 root 2499: WINAPI
1.1 root 2500: TlsAlloc(
2501: VOID
2502: );
2503:
2504: LPVOID
1.1.1.2 root 2505: WINAPI
1.1 root 2506: TlsGetValue(
2507: DWORD dwTlsIndex
2508: );
2509:
2510: BOOL
1.1.1.2 root 2511: WINAPI
1.1 root 2512: TlsSetValue(
2513: DWORD dwTlsIndex,
2514: LPVOID lpTlsValue
2515: );
2516:
2517: BOOL
1.1.1.2 root 2518: WINAPI
1.1 root 2519: TlsFree(
2520: DWORD dwTlsIndex
2521: );
2522:
1.1.1.2 root 2523: typedef
2524: VOID
1.1.1.3 ! root 2525: (WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)(
1.1.1.2 root 2526: DWORD dwErrorCode,
2527: DWORD dwNumberOfBytesTransfered,
2528: LPOVERLAPPED lpOverlapped
2529: );
2530:
2531: DWORD
2532: WINAPI
2533: SleepEx(
2534: DWORD dwMilliseconds,
2535: BOOL bAlertable
2536: );
2537:
2538: DWORD
2539: WINAPI
2540: WaitForSingleObjectEx(
2541: HANDLE hHandle,
2542: DWORD dwMilliseconds,
2543: BOOL bAlertable
2544: );
2545:
2546: DWORD
2547: WINAPI
2548: WaitForMultipleObjectsEx(
2549: DWORD nCount,
2550: LPHANDLE lpHandles,
2551: BOOL bWaitAll,
2552: DWORD dwMilliseconds,
2553: BOOL bAlertable
2554: );
2555:
2556: BOOL
2557: WINAPI
2558: ReadFileEx(
2559: HANDLE hFile,
2560: LPVOID lpBuffer,
2561: DWORD nNumberOfBytesToRead,
2562: LPOVERLAPPED lpOverlapped,
2563: LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
2564: );
2565:
2566: BOOL
2567: WINAPI
2568: WriteFileEx(
2569: HANDLE hFile,
2570: LPVOID lpBuffer,
2571: DWORD nNumberOfBytesToWrite,
2572: LPOVERLAPPED lpOverlapped,
2573: LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
2574: );
2575:
2576: BOOL
2577: WINAPI
2578: BackupRead(
2579: HANDLE hFile,
2580: LPBYTE lpBuffer,
2581: DWORD nNumberOfBytesToRead,
2582: LPDWORD lpNumberOfBytesRead,
1.1.1.3 ! root 2583: BOOL bAbort,
! 2584: BOOL bProcessSecurity,
1.1.1.2 root 2585: LPVOID *lpContext
2586: );
2587:
2588: BOOL
2589: WINAPI
2590: BackupWrite(
2591: HANDLE hFile,
2592: LPBYTE lpBuffer,
2593: DWORD nNumberOfBytesToWrite,
2594: LPDWORD lpNumberOfBytesWritten,
1.1.1.3 ! root 2595: BOOL bAbort,
! 2596: BOOL bProcessSecurity,
1.1.1.2 root 2597: LPVOID *lpContext
2598: );
2599:
2600: //
1.1 root 2601: // Dual Mode API below this line. Dual Mode Structures also included.
2602: //
2603:
1.1.1.2 root 2604: #define STARTF_USESHOWWINDOW 0x00000001
2605: #define STARTF_USESIZE 0x00000002
2606: #define STARTF_USEPOSITION 0x00000004
2607: #define STARTF_USECOUNTCHARS 0x00000008
2608: #define STARTF_USEFILLATTRIBUTE 0x00000010
2609: #define STARTF_RUNFULLSCREEN 0x00000020 // ignored for non-x86 platforms
2610: #define STARTF_FORCEONFEEDBACK 0x00000040
2611: #define STARTF_FORCEOFFFEEDBACK 0x00000080
1.1 root 2612:
2613: typedef struct _STARTUPINFOA {
2614: DWORD cb;
2615: LPSTR lpReserved;
2616: LPSTR lpDesktop;
2617: LPSTR lpTitle;
2618: DWORD dwX;
2619: DWORD dwY;
2620: DWORD dwXSize;
2621: DWORD dwYSize;
2622: DWORD dwXCountChars;
2623: DWORD dwYCountChars;
2624: DWORD dwFillAttribute;
2625: DWORD dwFlags;
2626: WORD wShowWindow;
2627: WORD cbReserved2;
2628: LPBYTE lpReserved2;
2629: } STARTUPINFOA, *LPSTARTUPINFOA;
2630: typedef struct _STARTUPINFOW {
2631: DWORD cb;
2632: LPWSTR lpReserved;
2633: LPWSTR lpDesktop;
2634: LPWSTR lpTitle;
2635: DWORD dwX;
2636: DWORD dwY;
2637: DWORD dwXSize;
2638: DWORD dwYSize;
2639: DWORD dwXCountChars;
2640: DWORD dwYCountChars;
2641: DWORD dwFillAttribute;
2642: DWORD dwFlags;
2643: WORD wShowWindow;
2644: WORD cbReserved2;
2645: LPBYTE lpReserved2;
2646: } STARTUPINFOW, *LPSTARTUPINFOW;
2647: #ifdef UNICODE
2648: #define STARTUPINFO STARTUPINFOW
2649: #define LPSTARTUPINFO LPSTARTUPINFOW
2650: #else
2651: #define STARTUPINFO STARTUPINFOA
2652: #define LPSTARTUPINFO LPSTARTUPINFOA
2653: #endif // UNICODE
2654:
1.1.1.3 ! root 2655: #define SHUTDOWN_NORETRY 0x00000001
! 2656:
1.1 root 2657: typedef struct _WIN32_FIND_DATAA {
2658: DWORD dwFileAttributes;
2659: FILETIME ftCreationTime;
2660: FILETIME ftLastAccessTime;
2661: FILETIME ftLastWriteTime;
2662: DWORD nFileSizeHigh;
2663: DWORD nFileSizeLow;
1.1.1.2 root 2664: DWORD dwReserved0;
2665: DWORD dwReserved1;
1.1 root 2666: CHAR cFileName[ MAX_PATH ];
1.1.1.2 root 2667: CHAR cAlternateFileName[ 14 ];
1.1 root 2668: } WIN32_FIND_DATAA, *PWIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
2669: typedef struct _WIN32_FIND_DATAW {
2670: DWORD dwFileAttributes;
2671: FILETIME ftCreationTime;
2672: FILETIME ftLastAccessTime;
2673: FILETIME ftLastWriteTime;
2674: DWORD nFileSizeHigh;
2675: DWORD nFileSizeLow;
1.1.1.2 root 2676: DWORD dwReserved0;
2677: DWORD dwReserved1;
1.1 root 2678: WCHAR cFileName[ MAX_PATH ];
1.1.1.2 root 2679: WCHAR cAlternateFileName[ 14 ];
1.1 root 2680: } WIN32_FIND_DATAW, *PWIN32_FIND_DATAW, *LPWIN32_FIND_DATAW;
2681: #ifdef UNICODE
2682: #define WIN32_FIND_DATA WIN32_FIND_DATAW
2683: #define PWIN32_FIND_DATA PWIN32_FIND_DATAW
2684: #define LPWIN32_FIND_DATA LPWIN32_FIND_DATAW
2685: #else
2686: #define WIN32_FIND_DATA WIN32_FIND_DATAA
2687: #define PWIN32_FIND_DATA PWIN32_FIND_DATAA
2688: #define LPWIN32_FIND_DATA LPWIN32_FIND_DATAA
2689: #endif // UNICODE
2690:
2691: HANDLE
1.1.1.2 root 2692: WINAPI
1.1 root 2693: CreateMutexA(
2694: LPSECURITY_ATTRIBUTES lpMutexAttributes,
2695: BOOL bInitialOwner,
2696: LPSTR lpName
2697: );
2698: HANDLE
1.1.1.2 root 2699: WINAPI
1.1 root 2700: CreateMutexW(
2701: LPSECURITY_ATTRIBUTES lpMutexAttributes,
2702: BOOL bInitialOwner,
2703: LPWSTR lpName
2704: );
2705: #ifdef UNICODE
2706: #define CreateMutex CreateMutexW
2707: #else
2708: #define CreateMutex CreateMutexA
2709: #endif // !UNICODE
2710:
2711: HANDLE
1.1.1.2 root 2712: WINAPI
1.1 root 2713: OpenMutexA(
2714: DWORD dwDesiredAccess,
2715: BOOL bInheritHandle,
2716: LPSTR lpName
2717: );
2718: HANDLE
1.1.1.2 root 2719: WINAPI
1.1 root 2720: OpenMutexW(
2721: DWORD dwDesiredAccess,
2722: BOOL bInheritHandle,
2723: LPWSTR lpName
2724: );
2725: #ifdef UNICODE
2726: #define OpenMutex OpenMutexW
2727: #else
2728: #define OpenMutex OpenMutexA
2729: #endif // !UNICODE
2730:
2731: HANDLE
1.1.1.2 root 2732: WINAPI
1.1 root 2733: CreateEventA(
2734: LPSECURITY_ATTRIBUTES lpEventAttributes,
2735: BOOL bManualReset,
2736: BOOL bInitialState,
2737: LPSTR lpName
2738: );
2739: HANDLE
1.1.1.2 root 2740: WINAPI
1.1 root 2741: CreateEventW(
2742: LPSECURITY_ATTRIBUTES lpEventAttributes,
2743: BOOL bManualReset,
2744: BOOL bInitialState,
2745: LPWSTR lpName
2746: );
2747: #ifdef UNICODE
2748: #define CreateEvent CreateEventW
2749: #else
2750: #define CreateEvent CreateEventA
2751: #endif // !UNICODE
2752:
2753: HANDLE
1.1.1.2 root 2754: WINAPI
1.1 root 2755: OpenEventA(
2756: DWORD dwDesiredAccess,
2757: BOOL bInheritHandle,
2758: LPSTR lpName
2759: );
2760: HANDLE
1.1.1.2 root 2761: WINAPI
1.1 root 2762: OpenEventW(
2763: DWORD dwDesiredAccess,
2764: BOOL bInheritHandle,
2765: LPWSTR lpName
2766: );
2767: #ifdef UNICODE
2768: #define OpenEvent OpenEventW
2769: #else
2770: #define OpenEvent OpenEventA
2771: #endif // !UNICODE
2772:
2773: HANDLE
1.1.1.2 root 2774: WINAPI
1.1 root 2775: CreateSemaphoreA(
2776: LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
2777: LONG lInitialCount,
2778: LONG lMaximumCount,
2779: LPSTR lpName
2780: );
2781: HANDLE
1.1.1.2 root 2782: WINAPI
1.1 root 2783: CreateSemaphoreW(
2784: LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
2785: LONG lInitialCount,
2786: LONG lMaximumCount,
2787: LPWSTR lpName
2788: );
2789: #ifdef UNICODE
2790: #define CreateSemaphore CreateSemaphoreW
2791: #else
2792: #define CreateSemaphore CreateSemaphoreA
2793: #endif // !UNICODE
2794:
2795: HANDLE
1.1.1.2 root 2796: WINAPI
1.1 root 2797: OpenSemaphoreA(
2798: DWORD dwDesiredAccess,
2799: BOOL bInheritHandle,
2800: LPSTR lpName
2801: );
2802: HANDLE
1.1.1.2 root 2803: WINAPI
1.1 root 2804: OpenSemaphoreW(
2805: DWORD dwDesiredAccess,
2806: BOOL bInheritHandle,
2807: LPWSTR lpName
2808: );
2809: #ifdef UNICODE
2810: #define OpenSemaphore OpenSemaphoreW
2811: #else
2812: #define OpenSemaphore OpenSemaphoreA
2813: #endif // !UNICODE
2814:
2815: HANDLE
1.1.1.2 root 2816: WINAPI
1.1 root 2817: CreateFileMappingA(
2818: HANDLE hFile,
2819: LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
2820: DWORD flProtect,
2821: DWORD dwMaximumSizeHigh,
2822: DWORD dwMaximumSizeLow,
2823: LPSTR lpName
2824: );
2825: HANDLE
1.1.1.2 root 2826: WINAPI
1.1 root 2827: CreateFileMappingW(
2828: HANDLE hFile,
2829: LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
2830: DWORD flProtect,
2831: DWORD dwMaximumSizeHigh,
2832: DWORD dwMaximumSizeLow,
2833: LPWSTR lpName
2834: );
2835: #ifdef UNICODE
2836: #define CreateFileMapping CreateFileMappingW
2837: #else
2838: #define CreateFileMapping CreateFileMappingA
2839: #endif // !UNICODE
2840:
2841: HANDLE
1.1.1.2 root 2842: WINAPI
1.1 root 2843: OpenFileMappingA(
2844: DWORD dwDesiredAccess,
2845: BOOL bInheritHandle,
2846: LPSTR lpName
2847: );
2848: HANDLE
1.1.1.2 root 2849: WINAPI
1.1 root 2850: OpenFileMappingW(
2851: DWORD dwDesiredAccess,
2852: BOOL bInheritHandle,
2853: LPWSTR lpName
2854: );
2855: #ifdef UNICODE
2856: #define OpenFileMapping OpenFileMappingW
2857: #else
2858: #define OpenFileMapping OpenFileMappingA
2859: #endif // !UNICODE
2860:
2861: DWORD
1.1.1.2 root 2862: WINAPI
1.1 root 2863: GetLogicalDriveStringsA(
2864: DWORD nBufferLength,
2865: LPSTR lpBuffer
2866: );
2867: DWORD
1.1.1.2 root 2868: WINAPI
1.1 root 2869: GetLogicalDriveStringsW(
2870: DWORD nBufferLength,
2871: LPWSTR lpBuffer
2872: );
2873: #ifdef UNICODE
2874: #define GetLogicalDriveStrings GetLogicalDriveStringsW
2875: #else
2876: #define GetLogicalDriveStrings GetLogicalDriveStringsA
2877: #endif // !UNICODE
2878:
1.1.1.3 ! root 2879: HINSTANCE
1.1.1.2 root 2880: WINAPI
1.1 root 2881: LoadLibraryA(
1.1.1.2 root 2882: LPCSTR lpLibFileName
1.1 root 2883: );
1.1.1.3 ! root 2884: HINSTANCE
1.1.1.2 root 2885: WINAPI
1.1 root 2886: LoadLibraryW(
1.1.1.2 root 2887: LPCWSTR lpLibFileName
1.1 root 2888: );
2889: #ifdef UNICODE
2890: #define LoadLibrary LoadLibraryW
2891: #else
2892: #define LoadLibrary LoadLibraryA
2893: #endif // !UNICODE
2894:
1.1.1.3 ! root 2895: HINSTANCE
! 2896: WINAPI
! 2897: LoadLibraryExA(
! 2898: LPCSTR lpLibFileName,
! 2899: HANDLE hFile,
! 2900: DWORD dwFlags
! 2901: );
! 2902: HINSTANCE
! 2903: WINAPI
! 2904: LoadLibraryExW(
! 2905: LPCWSTR lpLibFileName,
! 2906: HANDLE hFile,
! 2907: DWORD dwFlags
! 2908: );
! 2909: #ifdef UNICODE
! 2910: #define LoadLibraryEx LoadLibraryExW
! 2911: #else
! 2912: #define LoadLibraryEx LoadLibraryExA
! 2913: #endif // !UNICODE
! 2914:
! 2915: #define DONT_RESOLVE_DLL_REFERENCES 0x00000001
! 2916:
! 2917:
1.1 root 2918: DWORD
1.1.1.2 root 2919: WINAPI
1.1 root 2920: GetModuleFileNameA(
1.1.1.3 ! root 2921: HINSTANCE hModule,
1.1 root 2922: LPSTR lpFilename,
2923: DWORD nSize
2924: );
2925: DWORD
1.1.1.2 root 2926: WINAPI
1.1 root 2927: GetModuleFileNameW(
1.1.1.3 ! root 2928: HINSTANCE hModule,
1.1 root 2929: LPWSTR lpFilename,
2930: DWORD nSize
2931: );
2932: #ifdef UNICODE
2933: #define GetModuleFileName GetModuleFileNameW
2934: #else
2935: #define GetModuleFileName GetModuleFileNameA
2936: #endif // !UNICODE
2937:
1.1.1.3 ! root 2938: HMODULE
1.1.1.2 root 2939: WINAPI
1.1 root 2940: GetModuleHandleA(
1.1.1.2 root 2941: LPCSTR lpModuleName
1.1 root 2942: );
1.1.1.3 ! root 2943: HMODULE
1.1.1.2 root 2944: WINAPI
1.1 root 2945: GetModuleHandleW(
1.1.1.2 root 2946: LPCWSTR lpModuleName
1.1 root 2947: );
2948: #ifdef UNICODE
2949: #define GetModuleHandle GetModuleHandleW
2950: #else
2951: #define GetModuleHandle GetModuleHandleA
2952: #endif // !UNICODE
2953:
2954: BOOL
1.1.1.2 root 2955: WINAPI
1.1 root 2956: CreateProcessA(
1.1.1.2 root 2957: LPCSTR lpApplicationName,
2958: LPCSTR lpCommandLine,
1.1 root 2959: LPSECURITY_ATTRIBUTES lpProcessAttributes,
2960: LPSECURITY_ATTRIBUTES lpThreadAttributes,
2961: BOOL bInheritHandles,
2962: DWORD dwCreationFlags,
2963: LPVOID lpEnvironment,
2964: LPSTR lpCurrentDirectory,
2965: LPSTARTUPINFOA lpStartupInfo,
2966: LPPROCESS_INFORMATION lpProcessInformation
2967: );
2968: BOOL
1.1.1.2 root 2969: WINAPI
1.1 root 2970: CreateProcessW(
1.1.1.2 root 2971: LPCWSTR lpApplicationName,
2972: LPCWSTR lpCommandLine,
1.1 root 2973: LPSECURITY_ATTRIBUTES lpProcessAttributes,
2974: LPSECURITY_ATTRIBUTES lpThreadAttributes,
2975: BOOL bInheritHandles,
2976: DWORD dwCreationFlags,
2977: LPVOID lpEnvironment,
2978: LPWSTR lpCurrentDirectory,
2979: LPSTARTUPINFOW lpStartupInfo,
2980: LPPROCESS_INFORMATION lpProcessInformation
2981: );
2982: #ifdef UNICODE
2983: #define CreateProcess CreateProcessW
2984: #else
2985: #define CreateProcess CreateProcessA
2986: #endif // !UNICODE
2987:
1.1.1.3 ! root 2988: BOOL
! 2989: WINAPI
! 2990: SetProcessShutdownParameters(
! 2991: DWORD dwLevel,
! 2992: DWORD dwFlags
! 2993: );
! 2994:
! 2995: BOOL
! 2996: WINAPI
! 2997: GetProcessShutdownParameters(
! 2998: LPDWORD lpdwLevel,
! 2999: LPDWORD lpdwFlags
! 3000: );
! 3001:
1.1 root 3002: VOID
1.1.1.2 root 3003: WINAPI
1.1 root 3004: FatalAppExitA(
1.1.1.2 root 3005: UINT uAction,
3006: LPCSTR lpMessageText
1.1 root 3007: );
3008: VOID
1.1.1.2 root 3009: WINAPI
1.1 root 3010: FatalAppExitW(
1.1.1.2 root 3011: UINT uAction,
3012: LPCWSTR lpMessageText
1.1 root 3013: );
3014: #ifdef UNICODE
3015: #define FatalAppExit FatalAppExitW
3016: #else
3017: #define FatalAppExit FatalAppExitA
3018: #endif // !UNICODE
3019:
3020: VOID
1.1.1.2 root 3021: WINAPI
1.1 root 3022: GetStartupInfoA(
3023: LPSTARTUPINFOA lpStartupInfo
3024: );
3025: VOID
1.1.1.2 root 3026: WINAPI
1.1 root 3027: GetStartupInfoW(
3028: LPSTARTUPINFOW lpStartupInfo
3029: );
3030: #ifdef UNICODE
3031: #define GetStartupInfo GetStartupInfoW
3032: #else
3033: #define GetStartupInfo GetStartupInfoA
3034: #endif // !UNICODE
3035:
3036: LPSTR
1.1.1.2 root 3037: WINAPI
1.1 root 3038: GetCommandLineA(
3039: VOID
3040: );
3041: LPWSTR
1.1.1.2 root 3042: WINAPI
1.1 root 3043: GetCommandLineW(
3044: VOID
3045: );
3046: #ifdef UNICODE
3047: #define GetCommandLine GetCommandLineW
3048: #else
3049: #define GetCommandLine GetCommandLineA
3050: #endif // !UNICODE
3051:
3052: DWORD
1.1.1.2 root 3053: WINAPI
1.1 root 3054: GetEnvironmentVariableA(
3055: LPSTR lpName,
3056: LPSTR lpBuffer,
3057: DWORD nSize
3058: );
3059: DWORD
1.1.1.2 root 3060: WINAPI
1.1 root 3061: GetEnvironmentVariableW(
3062: LPWSTR lpName,
3063: LPWSTR lpBuffer,
3064: DWORD nSize
3065: );
3066: #ifdef UNICODE
3067: #define GetEnvironmentVariable GetEnvironmentVariableW
3068: #else
3069: #define GetEnvironmentVariable GetEnvironmentVariableA
3070: #endif // !UNICODE
3071:
3072: BOOL
1.1.1.2 root 3073: WINAPI
1.1 root 3074: SetEnvironmentVariableA(
3075: LPSTR lpName,
3076: LPSTR lpValue
3077: );
3078: BOOL
1.1.1.2 root 3079: WINAPI
1.1 root 3080: SetEnvironmentVariableW(
3081: LPWSTR lpName,
3082: LPWSTR lpValue
3083: );
3084: #ifdef UNICODE
3085: #define SetEnvironmentVariable SetEnvironmentVariableW
3086: #else
3087: #define SetEnvironmentVariable SetEnvironmentVariableA
3088: #endif // !UNICODE
3089:
1.1.1.2 root 3090: DWORD
3091: WINAPI
3092: ExpandEnvironmentStringsA(
3093: LPCSTR lpSrc,
3094: LPSTR lpDst,
3095: DWORD nSize
3096: );
3097: DWORD
3098: WINAPI
3099: ExpandEnvironmentStringsW(
3100: LPCWSTR lpSrc,
3101: LPWSTR lpDst,
3102: DWORD nSize
3103: );
3104: #ifdef UNICODE
3105: #define ExpandEnvironmentStrings ExpandEnvironmentStringsW
3106: #else
3107: #define ExpandEnvironmentStrings ExpandEnvironmentStringsA
3108: #endif // !UNICODE
3109:
1.1 root 3110: VOID
1.1.1.2 root 3111: WINAPI
1.1 root 3112: OutputDebugStringA(
1.1.1.2 root 3113: LPCSTR lpOutputString
1.1 root 3114: );
3115: VOID
1.1.1.2 root 3116: WINAPI
1.1 root 3117: OutputDebugStringW(
1.1.1.2 root 3118: LPCWSTR lpOutputString
1.1 root 3119: );
3120: #ifdef UNICODE
3121: #define OutputDebugString OutputDebugStringW
3122: #else
3123: #define OutputDebugString OutputDebugStringA
3124: #endif // !UNICODE
3125:
1.1.1.2 root 3126: HRSRC
3127: WINAPI
1.1 root 3128: FindResourceA(
1.1.1.3 ! root 3129: HINSTANCE hModule,
1.1.1.2 root 3130: LPCSTR lpName,
3131: LPCSTR lpType
1.1 root 3132: );
1.1.1.2 root 3133: HRSRC
3134: WINAPI
1.1 root 3135: FindResourceW(
1.1.1.3 ! root 3136: HINSTANCE hModule,
1.1.1.2 root 3137: LPCWSTR lpName,
3138: LPCWSTR lpType
1.1 root 3139: );
3140: #ifdef UNICODE
3141: #define FindResource FindResourceW
3142: #else
3143: #define FindResource FindResourceA
3144: #endif // !UNICODE
3145:
1.1.1.2 root 3146: HRSRC
3147: WINAPI
3148: FindResourceExA(
1.1.1.3 ! root 3149: HINSTANCE hModule,
1.1.1.2 root 3150: LPCSTR lpType,
3151: LPCSTR lpName,
3152: WORD wLanguage
3153: );
3154: HRSRC
3155: WINAPI
3156: FindResourceExW(
1.1.1.3 ! root 3157: HINSTANCE hModule,
1.1.1.2 root 3158: LPCWSTR lpType,
3159: LPCWSTR lpName,
3160: WORD wLanguage
3161: );
3162: #ifdef UNICODE
3163: #define FindResourceEx FindResourceExW
3164: #else
3165: #define FindResourceEx FindResourceExA
3166: #endif // !UNICODE
3167:
3168: #ifdef STRICT
1.1.1.3 ! root 3169: typedef BOOL (CALLBACK* ENUMRESTYPEPROC)(HINSTANCE hModule, LPTSTR lpType,
1.1.1.2 root 3170: LONG lParam);
1.1.1.3 ! root 3171: typedef BOOL (CALLBACK* ENUMRESNAMEPROC)(HINSTANCE hModule, LPCTSTR lpType,
1.1.1.2 root 3172: LPTSTR lpName, LONG lParam);
1.1.1.3 ! root 3173: typedef BOOL (CALLBACK* ENUMRESLANGPROC)(HINSTANCE hModule, LPCTSTR lpType,
1.1.1.2 root 3174: LPCTSTR lpName, WORD wLanguage, LONG lParam);
3175: #else
3176: typedef FARPROC ENUMRESTYPEPROC;
3177: typedef FARPROC ENUMRESNAMEPROC;
3178: typedef FARPROC ENUMRESLANGPROC;
3179: #endif
3180:
1.1 root 3181: BOOL
1.1.1.2 root 3182: WINAPI
1.1 root 3183: EnumResourceTypesA(
1.1.1.3 ! root 3184: HINSTANCE hModule,
1.1.1.2 root 3185: ENUMRESTYPEPROC lpEnumFunc,
1.1 root 3186: LONG lParam
3187: );
3188: BOOL
1.1.1.2 root 3189: WINAPI
1.1 root 3190: EnumResourceTypesW(
1.1.1.3 ! root 3191: HINSTANCE hModule,
1.1.1.2 root 3192: ENUMRESTYPEPROC lpEnumFunc,
1.1 root 3193: LONG lParam
3194: );
3195: #ifdef UNICODE
3196: #define EnumResourceTypes EnumResourceTypesW
3197: #else
3198: #define EnumResourceTypes EnumResourceTypesA
3199: #endif // !UNICODE
3200:
3201:
3202: BOOL
1.1.1.2 root 3203: WINAPI
1.1 root 3204: EnumResourceNamesA(
1.1.1.3 ! root 3205: HINSTANCE hModule,
1.1.1.2 root 3206: LPCSTR lpType,
3207: ENUMRESNAMEPROC lpEnumFunc,
1.1 root 3208: LONG lParam
3209: );
3210: BOOL
1.1.1.2 root 3211: WINAPI
1.1 root 3212: EnumResourceNamesW(
1.1.1.3 ! root 3213: HINSTANCE hModule,
1.1.1.2 root 3214: LPCWSTR lpType,
3215: ENUMRESNAMEPROC lpEnumFunc,
1.1 root 3216: LONG lParam
3217: );
3218: #ifdef UNICODE
3219: #define EnumResourceNames EnumResourceNamesW
3220: #else
3221: #define EnumResourceNames EnumResourceNamesA
3222: #endif // !UNICODE
3223:
1.1.1.2 root 3224: BOOL
3225: WINAPI
3226: EnumResourceLanguagesA(
1.1.1.3 ! root 3227: HINSTANCE hModule,
1.1.1.2 root 3228: LPCSTR lpType,
3229: LPCSTR lpName,
3230: ENUMRESLANGPROC lpEnumFunc,
3231: LONG lParam
3232: );
3233: BOOL
3234: WINAPI
3235: EnumResourceLanguagesW(
1.1.1.3 ! root 3236: HINSTANCE hModule,
1.1.1.2 root 3237: LPCWSTR lpType,
3238: LPCWSTR lpName,
3239: ENUMRESLANGPROC lpEnumFunc,
3240: LONG lParam
3241: );
3242: #ifdef UNICODE
3243: #define EnumResourceLanguages EnumResourceLanguagesW
3244: #else
3245: #define EnumResourceLanguages EnumResourceLanguagesA
3246: #endif // !UNICODE
3247:
3248: HANDLE
3249: WINAPI
3250: BeginUpdateResourceA(
1.1.1.3 ! root 3251: LPSTR pFileName,
! 3252: BOOL bDeleteExistingResources
1.1.1.2 root 3253: );
3254: HANDLE
3255: WINAPI
3256: BeginUpdateResourceW(
1.1.1.3 ! root 3257: LPWSTR pFileName,
! 3258: BOOL bDeleteExistingResources
1.1.1.2 root 3259: );
3260: #ifdef UNICODE
3261: #define BeginUpdateResource BeginUpdateResourceW
3262: #else
3263: #define BeginUpdateResource BeginUpdateResourceA
3264: #endif // !UNICODE
3265:
3266: BOOL
3267: WINAPI
3268: UpdateResourceA(
3269: HANDLE hUpdate,
3270: LPSTR lpType,
3271: LPSTR lpName,
3272: WORD wLanguage,
3273: LPVOID lpData,
3274: DWORD cbData
3275: );
3276: BOOL
3277: WINAPI
3278: UpdateResourceW(
3279: HANDLE hUpdate,
3280: LPWSTR lpType,
3281: LPWSTR lpName,
3282: WORD wLanguage,
3283: LPVOID lpData,
3284: DWORD cbData
3285: );
3286: #ifdef UNICODE
3287: #define UpdateResource UpdateResourceW
3288: #else
3289: #define UpdateResource UpdateResourceA
3290: #endif // !UNICODE
3291:
3292: BOOL
3293: WINAPI
3294: EndUpdateResourceA(
3295: HANDLE hUpdate,
3296: BOOL fDiscard
3297: );
3298: BOOL
3299: WINAPI
3300: EndUpdateResourceW(
3301: HANDLE hUpdate,
3302: BOOL fDiscard
3303: );
3304: #ifdef UNICODE
3305: #define EndUpdateResource EndUpdateResourceW
3306: #else
3307: #define EndUpdateResource EndUpdateResourceA
3308: #endif // !UNICODE
3309:
1.1 root 3310: ATOM
1.1.1.2 root 3311: WINAPI
1.1 root 3312: GlobalAddAtomA(
1.1.1.2 root 3313: LPCSTR lpString
1.1 root 3314: );
3315: ATOM
1.1.1.2 root 3316: WINAPI
1.1 root 3317: GlobalAddAtomW(
1.1.1.2 root 3318: LPCWSTR lpString
1.1 root 3319: );
3320: #ifdef UNICODE
3321: #define GlobalAddAtom GlobalAddAtomW
3322: #else
3323: #define GlobalAddAtom GlobalAddAtomA
3324: #endif // !UNICODE
3325:
3326: ATOM
1.1.1.2 root 3327: WINAPI
1.1 root 3328: GlobalFindAtomA(
1.1.1.2 root 3329: LPCSTR lpString
1.1 root 3330: );
3331: ATOM
1.1.1.2 root 3332: WINAPI
1.1 root 3333: GlobalFindAtomW(
1.1.1.2 root 3334: LPCWSTR lpString
1.1 root 3335: );
3336: #ifdef UNICODE
3337: #define GlobalFindAtom GlobalFindAtomW
3338: #else
3339: #define GlobalFindAtom GlobalFindAtomA
3340: #endif // !UNICODE
3341:
1.1.1.2 root 3342: UINT
3343: WINAPI
1.1 root 3344: GlobalGetAtomNameA(
3345: ATOM nAtom,
3346: LPSTR lpBuffer,
1.1.1.2 root 3347: int nSize
1.1 root 3348: );
1.1.1.2 root 3349: UINT
3350: WINAPI
1.1 root 3351: GlobalGetAtomNameW(
3352: ATOM nAtom,
3353: LPWSTR lpBuffer,
1.1.1.2 root 3354: int nSize
1.1 root 3355: );
3356: #ifdef UNICODE
3357: #define GlobalGetAtomName GlobalGetAtomNameW
3358: #else
3359: #define GlobalGetAtomName GlobalGetAtomNameA
3360: #endif // !UNICODE
3361:
3362: ATOM
1.1.1.2 root 3363: WINAPI
1.1 root 3364: AddAtomA(
1.1.1.2 root 3365: LPCSTR lpString
1.1 root 3366: );
3367: ATOM
1.1.1.2 root 3368: WINAPI
1.1 root 3369: AddAtomW(
1.1.1.2 root 3370: LPCWSTR lpString
1.1 root 3371: );
3372: #ifdef UNICODE
3373: #define AddAtom AddAtomW
3374: #else
3375: #define AddAtom AddAtomA
3376: #endif // !UNICODE
3377:
3378: ATOM
1.1.1.2 root 3379: WINAPI
1.1 root 3380: FindAtomA(
1.1.1.2 root 3381: LPCSTR lpString
1.1 root 3382: );
3383: ATOM
1.1.1.2 root 3384: WINAPI
1.1 root 3385: FindAtomW(
1.1.1.2 root 3386: LPCWSTR lpString
1.1 root 3387: );
3388: #ifdef UNICODE
3389: #define FindAtom FindAtomW
3390: #else
3391: #define FindAtom FindAtomA
3392: #endif // !UNICODE
3393:
1.1.1.2 root 3394: UINT
3395: WINAPI
1.1 root 3396: GetAtomNameA(
3397: ATOM nAtom,
3398: LPSTR lpBuffer,
1.1.1.2 root 3399: int nSize
1.1 root 3400: );
1.1.1.2 root 3401: UINT
3402: WINAPI
1.1 root 3403: GetAtomNameW(
3404: ATOM nAtom,
3405: LPWSTR lpBuffer,
1.1.1.2 root 3406: int nSize
1.1 root 3407: );
3408: #ifdef UNICODE
3409: #define GetAtomName GetAtomNameW
3410: #else
3411: #define GetAtomName GetAtomNameA
3412: #endif // !UNICODE
3413:
1.1.1.2 root 3414: UINT
3415: WINAPI
1.1 root 3416: GetProfileIntA(
1.1.1.2 root 3417: LPCSTR lpAppName,
3418: LPCSTR lpKeyName,
1.1 root 3419: DWORD nDefault
3420: );
1.1.1.2 root 3421: UINT
3422: WINAPI
1.1 root 3423: GetProfileIntW(
1.1.1.2 root 3424: LPCWSTR lpAppName,
3425: LPCWSTR lpKeyName,
1.1 root 3426: DWORD nDefault
3427: );
3428: #ifdef UNICODE
3429: #define GetProfileInt GetProfileIntW
3430: #else
3431: #define GetProfileInt GetProfileIntA
3432: #endif // !UNICODE
3433:
3434: DWORD
1.1.1.2 root 3435: WINAPI
1.1 root 3436: GetProfileStringA(
1.1.1.2 root 3437: LPCSTR lpAppName,
3438: LPCSTR lpKeyName,
3439: LPCSTR lpDefault,
1.1 root 3440: LPSTR lpReturnedString,
3441: DWORD nSize
3442: );
3443: DWORD
1.1.1.2 root 3444: WINAPI
1.1 root 3445: GetProfileStringW(
1.1.1.2 root 3446: LPCWSTR lpAppName,
3447: LPCWSTR lpKeyName,
3448: LPCWSTR lpDefault,
1.1 root 3449: LPWSTR lpReturnedString,
3450: DWORD nSize
3451: );
3452: #ifdef UNICODE
3453: #define GetProfileString GetProfileStringW
3454: #else
3455: #define GetProfileString GetProfileStringA
3456: #endif // !UNICODE
3457:
3458: BOOL
1.1.1.2 root 3459: WINAPI
1.1 root 3460: WriteProfileStringA(
1.1.1.2 root 3461: LPCSTR lpAppName,
3462: LPCSTR lpKeyName,
3463: LPCSTR lpString
1.1 root 3464: );
3465: BOOL
1.1.1.2 root 3466: WINAPI
1.1 root 3467: WriteProfileStringW(
1.1.1.2 root 3468: LPCWSTR lpAppName,
3469: LPCWSTR lpKeyName,
3470: LPCWSTR lpString
1.1 root 3471: );
3472: #ifdef UNICODE
3473: #define WriteProfileString WriteProfileStringW
3474: #else
3475: #define WriteProfileString WriteProfileStringA
3476: #endif // !UNICODE
3477:
3478: DWORD
1.1.1.2 root 3479: WINAPI
1.1 root 3480: GetProfileSectionA(
1.1.1.2 root 3481: LPCSTR lpAppName,
1.1 root 3482: LPSTR lpReturnedString,
3483: DWORD nSize
3484: );
3485: DWORD
1.1.1.2 root 3486: WINAPI
1.1 root 3487: GetProfileSectionW(
1.1.1.2 root 3488: LPCWSTR lpAppName,
1.1 root 3489: LPWSTR lpReturnedString,
3490: DWORD nSize
3491: );
3492: #ifdef UNICODE
3493: #define GetProfileSection GetProfileSectionW
3494: #else
3495: #define GetProfileSection GetProfileSectionA
3496: #endif // !UNICODE
3497:
1.1.1.2 root 3498: BOOL
3499: WINAPI
1.1 root 3500: WriteProfileSectionA(
1.1.1.2 root 3501: LPCSTR lpAppName,
3502: LPCSTR lpString
1.1 root 3503: );
1.1.1.2 root 3504: BOOL
3505: WINAPI
1.1 root 3506: WriteProfileSectionW(
1.1.1.2 root 3507: LPCWSTR lpAppName,
3508: LPCWSTR lpString
1.1 root 3509: );
3510: #ifdef UNICODE
3511: #define WriteProfileSection WriteProfileSectionW
3512: #else
3513: #define WriteProfileSection WriteProfileSectionA
3514: #endif // !UNICODE
3515:
1.1.1.2 root 3516: UINT
3517: WINAPI
1.1 root 3518: GetPrivateProfileIntA(
1.1.1.2 root 3519: LPCSTR lpAppName,
3520: LPCSTR lpKeyName,
1.1 root 3521: DWORD nDefault,
1.1.1.2 root 3522: LPCSTR lpFileName
1.1 root 3523: );
1.1.1.2 root 3524: UINT
3525: WINAPI
1.1 root 3526: GetPrivateProfileIntW(
1.1.1.2 root 3527: LPCWSTR lpAppName,
3528: LPCWSTR lpKeyName,
1.1 root 3529: DWORD nDefault,
1.1.1.2 root 3530: LPCWSTR lpFileName
1.1 root 3531: );
3532: #ifdef UNICODE
3533: #define GetPrivateProfileInt GetPrivateProfileIntW
3534: #else
3535: #define GetPrivateProfileInt GetPrivateProfileIntA
3536: #endif // !UNICODE
3537:
3538: DWORD
1.1.1.2 root 3539: WINAPI
1.1 root 3540: GetPrivateProfileStringA(
1.1.1.2 root 3541: LPCSTR lpAppName,
3542: LPCSTR lpKeyName,
3543: LPCSTR lpDefault,
1.1 root 3544: LPSTR lpReturnedString,
3545: DWORD nSize,
1.1.1.2 root 3546: LPCSTR lpFileName
1.1 root 3547: );
3548: DWORD
1.1.1.2 root 3549: WINAPI
1.1 root 3550: GetPrivateProfileStringW(
1.1.1.2 root 3551: LPCWSTR lpAppName,
3552: LPCWSTR lpKeyName,
3553: LPCWSTR lpDefault,
1.1 root 3554: LPWSTR lpReturnedString,
3555: DWORD nSize,
1.1.1.2 root 3556: LPCWSTR lpFileName
1.1 root 3557: );
3558: #ifdef UNICODE
3559: #define GetPrivateProfileString GetPrivateProfileStringW
3560: #else
3561: #define GetPrivateProfileString GetPrivateProfileStringA
3562: #endif // !UNICODE
3563:
3564: BOOL
1.1.1.2 root 3565: WINAPI
1.1 root 3566: WritePrivateProfileStringA(
1.1.1.2 root 3567: LPCSTR lpAppName,
3568: LPCSTR lpKeyName,
3569: LPCSTR lpString,
3570: LPCSTR lpFileName
1.1 root 3571: );
3572: BOOL
1.1.1.2 root 3573: WINAPI
1.1 root 3574: WritePrivateProfileStringW(
1.1.1.2 root 3575: LPCWSTR lpAppName,
3576: LPCWSTR lpKeyName,
3577: LPCWSTR lpString,
3578: LPCWSTR lpFileName
1.1 root 3579: );
3580: #ifdef UNICODE
3581: #define WritePrivateProfileString WritePrivateProfileStringW
3582: #else
3583: #define WritePrivateProfileString WritePrivateProfileStringA
3584: #endif // !UNICODE
3585:
3586: DWORD
1.1.1.2 root 3587: WINAPI
1.1 root 3588: GetPrivateProfileSectionA(
1.1.1.2 root 3589: LPCSTR lpAppName,
1.1 root 3590: LPSTR lpReturnedString,
3591: DWORD nSize,
1.1.1.2 root 3592: LPCSTR lpFileName
1.1 root 3593: );
3594: DWORD
1.1.1.2 root 3595: WINAPI
1.1 root 3596: GetPrivateProfileSectionW(
1.1.1.2 root 3597: LPCWSTR lpAppName,
1.1 root 3598: LPWSTR lpReturnedString,
3599: DWORD nSize,
1.1.1.2 root 3600: LPCWSTR lpFileName
1.1 root 3601: );
3602: #ifdef UNICODE
3603: #define GetPrivateProfileSection GetPrivateProfileSectionW
3604: #else
3605: #define GetPrivateProfileSection GetPrivateProfileSectionA
3606: #endif // !UNICODE
3607:
1.1.1.2 root 3608: BOOL
3609: WINAPI
1.1 root 3610: WritePrivateProfileSectionA(
1.1.1.2 root 3611: LPCSTR lpAppName,
3612: LPCSTR lpString,
3613: LPCSTR lpFileName
1.1 root 3614: );
1.1.1.2 root 3615: BOOL
3616: WINAPI
1.1 root 3617: WritePrivateProfileSectionW(
1.1.1.2 root 3618: LPCWSTR lpAppName,
3619: LPCWSTR lpString,
3620: LPCWSTR lpFileName
1.1 root 3621: );
3622: #ifdef UNICODE
3623: #define WritePrivateProfileSection WritePrivateProfileSectionW
3624: #else
3625: #define WritePrivateProfileSection WritePrivateProfileSectionA
3626: #endif // !UNICODE
3627:
1.1.1.2 root 3628: UINT
3629: WINAPI
1.1 root 3630: GetDriveTypeA(
3631: LPSTR lpRootPathName
3632: );
1.1.1.2 root 3633: UINT
3634: WINAPI
1.1 root 3635: GetDriveTypeW(
3636: LPWSTR lpRootPathName
3637: );
3638: #ifdef UNICODE
3639: #define GetDriveType GetDriveTypeW
3640: #else
3641: #define GetDriveType GetDriveTypeA
3642: #endif // !UNICODE
3643:
1.1.1.2 root 3644: UINT
3645: WINAPI
1.1 root 3646: GetSystemDirectoryA(
3647: LPSTR lpBuffer,
1.1.1.2 root 3648: UINT uSize
1.1 root 3649: );
1.1.1.2 root 3650: UINT
3651: WINAPI
1.1 root 3652: GetSystemDirectoryW(
3653: LPWSTR lpBuffer,
1.1.1.2 root 3654: UINT uSize
1.1 root 3655: );
3656: #ifdef UNICODE
3657: #define GetSystemDirectory GetSystemDirectoryW
3658: #else
3659: #define GetSystemDirectory GetSystemDirectoryA
3660: #endif // !UNICODE
3661:
3662: DWORD
1.1.1.2 root 3663: WINAPI
1.1 root 3664: GetTempPathA(
3665: DWORD nBufferLength,
3666: LPSTR lpBuffer
3667: );
3668: DWORD
1.1.1.2 root 3669: WINAPI
1.1 root 3670: GetTempPathW(
3671: DWORD nBufferLength,
3672: LPWSTR lpBuffer
3673: );
3674: #ifdef UNICODE
3675: #define GetTempPath GetTempPathW
3676: #else
3677: #define GetTempPath GetTempPathA
3678: #endif // !UNICODE
3679:
1.1.1.2 root 3680: UINT
3681: WINAPI
1.1 root 3682: GetTempFileNameA(
1.1.1.2 root 3683: LPCSTR lpPathName,
3684: LPCSTR lpPrefixString,
3685: UINT uUnique,
1.1 root 3686: LPSTR lpTempFileName
3687: );
1.1.1.2 root 3688: UINT
3689: WINAPI
1.1 root 3690: GetTempFileNameW(
1.1.1.2 root 3691: LPCWSTR lpPathName,
3692: LPCWSTR lpPrefixString,
3693: UINT uUnique,
1.1 root 3694: LPWSTR lpTempFileName
3695: );
3696: #ifdef UNICODE
3697: #define GetTempFileName GetTempFileNameW
3698: #else
3699: #define GetTempFileName GetTempFileNameA
3700: #endif // !UNICODE
3701:
1.1.1.2 root 3702: UINT
3703: WINAPI
1.1 root 3704: GetWindowsDirectoryA(
3705: LPSTR lpBuffer,
1.1.1.2 root 3706: UINT uSize
1.1 root 3707: );
1.1.1.2 root 3708: UINT
3709: WINAPI
1.1 root 3710: GetWindowsDirectoryW(
3711: LPWSTR lpBuffer,
1.1.1.2 root 3712: UINT uSize
1.1 root 3713: );
3714: #ifdef UNICODE
3715: #define GetWindowsDirectory GetWindowsDirectoryW
3716: #else
3717: #define GetWindowsDirectory GetWindowsDirectoryA
3718: #endif // !UNICODE
3719:
3720: BOOL
1.1.1.2 root 3721: WINAPI
1.1 root 3722: SetCurrentDirectoryA(
3723: LPSTR lpPathName
3724: );
3725: BOOL
1.1.1.2 root 3726: WINAPI
1.1 root 3727: SetCurrentDirectoryW(
3728: LPWSTR lpPathName
3729: );
3730: #ifdef UNICODE
3731: #define SetCurrentDirectory SetCurrentDirectoryW
3732: #else
3733: #define SetCurrentDirectory SetCurrentDirectoryA
3734: #endif // !UNICODE
3735:
3736: DWORD
1.1.1.2 root 3737: WINAPI
1.1 root 3738: GetCurrentDirectoryA(
3739: DWORD nBufferLength,
3740: LPSTR lpBuffer
3741: );
3742: DWORD
1.1.1.2 root 3743: WINAPI
1.1 root 3744: GetCurrentDirectoryW(
3745: DWORD nBufferLength,
3746: LPWSTR lpBuffer
3747: );
3748: #ifdef UNICODE
3749: #define GetCurrentDirectory GetCurrentDirectoryW
3750: #else
3751: #define GetCurrentDirectory GetCurrentDirectoryA
3752: #endif // !UNICODE
3753:
3754: BOOL
1.1.1.2 root 3755: WINAPI
1.1 root 3756: GetDiskFreeSpaceA(
3757: LPSTR lpRootPathName,
3758: LPDWORD lpSectorsPerCluster,
3759: LPDWORD lpBytesPerSector,
3760: LPDWORD lpNumberOfFreeClusters,
3761: LPDWORD lpTotalNumberOfClusters
3762: );
3763: BOOL
1.1.1.2 root 3764: WINAPI
1.1 root 3765: GetDiskFreeSpaceW(
3766: LPWSTR lpRootPathName,
3767: LPDWORD lpSectorsPerCluster,
3768: LPDWORD lpBytesPerSector,
3769: LPDWORD lpNumberOfFreeClusters,
3770: LPDWORD lpTotalNumberOfClusters
3771: );
3772: #ifdef UNICODE
3773: #define GetDiskFreeSpace GetDiskFreeSpaceW
3774: #else
3775: #define GetDiskFreeSpace GetDiskFreeSpaceA
3776: #endif // !UNICODE
3777:
3778: BOOL
1.1.1.2 root 3779: WINAPI
1.1 root 3780: CreateDirectoryA(
3781: LPSTR lpPathName,
3782: LPSECURITY_ATTRIBUTES lpSecurityAttributes
3783: );
3784: BOOL
1.1.1.2 root 3785: WINAPI
1.1 root 3786: CreateDirectoryW(
3787: LPWSTR lpPathName,
3788: LPSECURITY_ATTRIBUTES lpSecurityAttributes
3789: );
3790: #ifdef UNICODE
3791: #define CreateDirectory CreateDirectoryW
3792: #else
3793: #define CreateDirectory CreateDirectoryA
3794: #endif // !UNICODE
3795:
3796: BOOL
1.1.1.2 root 3797: WINAPI
1.1 root 3798: RemoveDirectoryA(
3799: LPSTR lpPathName
3800: );
3801: BOOL
1.1.1.2 root 3802: WINAPI
1.1 root 3803: RemoveDirectoryW(
3804: LPWSTR lpPathName
3805: );
3806: #ifdef UNICODE
3807: #define RemoveDirectory RemoveDirectoryW
3808: #else
3809: #define RemoveDirectory RemoveDirectoryA
3810: #endif // !UNICODE
3811:
3812: DWORD
1.1.1.2 root 3813: WINAPI
1.1 root 3814: GetFullPathNameA(
1.1.1.2 root 3815: LPCSTR lpFileName,
1.1 root 3816: DWORD nBufferLength,
3817: LPSTR lpBuffer,
3818: LPSTR *lpFilePart
3819: );
3820: DWORD
1.1.1.2 root 3821: WINAPI
1.1 root 3822: GetFullPathNameW(
1.1.1.2 root 3823: LPCWSTR lpFileName,
1.1 root 3824: DWORD nBufferLength,
3825: LPWSTR lpBuffer,
3826: LPWSTR *lpFilePart
3827: );
3828: #ifdef UNICODE
3829: #define GetFullPathName GetFullPathNameW
3830: #else
3831: #define GetFullPathName GetFullPathNameA
3832: #endif // !UNICODE
3833:
3834: #define EXPAND_LOCAL_DRIVES
3835:
3836:
3837: HANDLE
1.1.1.2 root 3838: WINAPI
1.1 root 3839: CreateFileA(
1.1.1.2 root 3840: LPCSTR lpFileName,
1.1 root 3841: DWORD dwDesiredAccess,
3842: DWORD dwShareMode,
3843: LPSECURITY_ATTRIBUTES lpSecurityAttributes,
3844: DWORD dwCreationDisposition,
3845: DWORD dwFlagsAndAttributes,
3846: HANDLE hTemplateFile
3847: );
3848: HANDLE
1.1.1.2 root 3849: WINAPI
1.1 root 3850: CreateFileW(
1.1.1.2 root 3851: LPCWSTR lpFileName,
1.1 root 3852: DWORD dwDesiredAccess,
3853: DWORD dwShareMode,
3854: LPSECURITY_ATTRIBUTES lpSecurityAttributes,
3855: DWORD dwCreationDisposition,
3856: DWORD dwFlagsAndAttributes,
3857: HANDLE hTemplateFile
3858: );
3859: #ifdef UNICODE
3860: #define CreateFile CreateFileW
3861: #else
3862: #define CreateFile CreateFileA
3863: #endif // !UNICODE
3864:
3865: BOOL
1.1.1.2 root 3866: WINAPI
1.1 root 3867: SetFileAttributesA(
3868: LPSTR lpFileName,
3869: DWORD dwFileAttributes
3870: );
3871: BOOL
1.1.1.2 root 3872: WINAPI
1.1 root 3873: SetFileAttributesW(
3874: LPWSTR lpFileName,
3875: DWORD dwFileAttributes
3876: );
3877: #ifdef UNICODE
3878: #define SetFileAttributes SetFileAttributesW
3879: #else
3880: #define SetFileAttributes SetFileAttributesA
3881: #endif // !UNICODE
3882:
3883: DWORD
1.1.1.2 root 3884: WINAPI
1.1 root 3885: GetFileAttributesA(
3886: LPSTR lpFileName
3887: );
3888: DWORD
1.1.1.2 root 3889: WINAPI
1.1 root 3890: GetFileAttributesW(
3891: LPWSTR lpFileName
3892: );
3893: #ifdef UNICODE
3894: #define GetFileAttributes GetFileAttributesW
3895: #else
3896: #define GetFileAttributes GetFileAttributesA
3897: #endif // !UNICODE
3898:
3899: BOOL
1.1.1.2 root 3900: WINAPI
1.1 root 3901: DeleteFileA(
3902: LPSTR lpFileName
3903: );
3904: BOOL
1.1.1.2 root 3905: WINAPI
1.1 root 3906: DeleteFileW(
3907: LPWSTR lpFileName
3908: );
3909: #ifdef UNICODE
3910: #define DeleteFile DeleteFileW
3911: #else
3912: #define DeleteFile DeleteFileA
3913: #endif // !UNICODE
3914:
3915: HANDLE
1.1.1.2 root 3916: WINAPI
1.1 root 3917: FindFirstFileA(
3918: LPSTR lpFileName,
3919: LPWIN32_FIND_DATAA lpFindFileData
3920: );
3921: HANDLE
1.1.1.2 root 3922: WINAPI
1.1 root 3923: FindFirstFileW(
3924: LPWSTR lpFileName,
3925: LPWIN32_FIND_DATAW lpFindFileData
3926: );
3927: #ifdef UNICODE
3928: #define FindFirstFile FindFirstFileW
3929: #else
3930: #define FindFirstFile FindFirstFileA
3931: #endif // !UNICODE
3932:
3933: BOOL
1.1.1.2 root 3934: WINAPI
1.1 root 3935: FindNextFileA(
3936: HANDLE hFindFile,
3937: LPWIN32_FIND_DATAA lpFindFileData
3938: );
3939: BOOL
1.1.1.2 root 3940: WINAPI
1.1 root 3941: FindNextFileW(
3942: HANDLE hFindFile,
3943: LPWIN32_FIND_DATAW lpFindFileData
3944: );
3945: #ifdef UNICODE
3946: #define FindNextFile FindNextFileW
3947: #else
3948: #define FindNextFile FindNextFileA
3949: #endif // !UNICODE
3950:
3951: DWORD
1.1.1.2 root 3952: WINAPI
1.1 root 3953: SearchPathA(
1.1.1.2 root 3954: LPCSTR lpPath,
3955: LPCSTR lpFileName,
3956: LPCSTR lpExtension,
1.1 root 3957: DWORD nBufferLength,
3958: LPSTR lpBuffer,
3959: LPSTR *lpFilePart
3960: );
3961: DWORD
1.1.1.2 root 3962: WINAPI
1.1 root 3963: SearchPathW(
1.1.1.2 root 3964: LPCWSTR lpPath,
3965: LPCWSTR lpFileName,
3966: LPCWSTR lpExtension,
1.1 root 3967: DWORD nBufferLength,
3968: LPWSTR lpBuffer,
3969: LPWSTR *lpFilePart
3970: );
3971: #ifdef UNICODE
3972: #define SearchPath SearchPathW
3973: #else
3974: #define SearchPath SearchPathA
3975: #endif // !UNICODE
3976:
3977: BOOL
1.1.1.2 root 3978: WINAPI
1.1 root 3979: CopyFileA(
3980: LPSTR lpExistingFileName,
3981: LPSTR lpNewFileName,
3982: BOOL bFailIfExists
3983: );
3984: BOOL
1.1.1.2 root 3985: WINAPI
1.1 root 3986: CopyFileW(
3987: LPWSTR lpExistingFileName,
3988: LPWSTR lpNewFileName,
3989: BOOL bFailIfExists
3990: );
3991: #ifdef UNICODE
3992: #define CopyFile CopyFileW
3993: #else
3994: #define CopyFile CopyFileA
3995: #endif // !UNICODE
3996:
3997: BOOL
1.1.1.2 root 3998: WINAPI
1.1 root 3999: MoveFileA(
4000: LPSTR lpExistingFileName,
4001: LPSTR lpNewFileName
4002: );
4003: BOOL
1.1.1.2 root 4004: WINAPI
1.1 root 4005: MoveFileW(
4006: LPWSTR lpExistingFileName,
4007: LPWSTR lpNewFileName
4008: );
4009: #ifdef UNICODE
4010: #define MoveFile MoveFileW
4011: #else
4012: #define MoveFile MoveFileA
4013: #endif // !UNICODE
4014:
1.1.1.3 ! root 4015: BOOL
! 4016: WINAPI
! 4017: MoveFileExA(
! 4018: LPSTR lpExistingFileName,
! 4019: LPSTR lpNewFileName,
! 4020: DWORD dwFlags
! 4021: );
! 4022: BOOL
! 4023: WINAPI
! 4024: MoveFileExW(
! 4025: LPWSTR lpExistingFileName,
! 4026: LPWSTR lpNewFileName,
! 4027: DWORD dwFlags
! 4028: );
! 4029: #ifdef UNICODE
! 4030: #define MoveFileEx MoveFileExW
! 4031: #else
! 4032: #define MoveFileEx MoveFileExA
! 4033: #endif // !UNICODE
! 4034:
! 4035: #define MOVEFILE_REPLACE_EXISTING 0x00000001
! 4036: #define MOVEFILE_COPY_ALLOWED 0x00000002
! 4037: #define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
! 4038:
1.1 root 4039: HANDLE
1.1.1.2 root 4040: WINAPI
1.1 root 4041: CreateNamedPipeA(
4042: LPSTR lpName,
4043: DWORD dwOpenMode,
4044: DWORD dwPipeMode,
4045: DWORD nMaxInstances,
4046: DWORD nOutBufferSize,
4047: DWORD nInBufferSize,
4048: DWORD nDefaultTimeOut,
4049: LPSECURITY_ATTRIBUTES lpSecurityAttributes
4050: );
4051: HANDLE
1.1.1.2 root 4052: WINAPI
1.1 root 4053: CreateNamedPipeW(
4054: LPWSTR lpName,
4055: DWORD dwOpenMode,
4056: DWORD dwPipeMode,
4057: DWORD nMaxInstances,
4058: DWORD nOutBufferSize,
4059: DWORD nInBufferSize,
4060: DWORD nDefaultTimeOut,
4061: LPSECURITY_ATTRIBUTES lpSecurityAttributes
4062: );
4063: #ifdef UNICODE
4064: #define CreateNamedPipe CreateNamedPipeW
4065: #else
4066: #define CreateNamedPipe CreateNamedPipeA
4067: #endif // !UNICODE
4068:
4069: BOOL
1.1.1.2 root 4070: WINAPI
1.1 root 4071: GetNamedPipeHandleStateA(
4072: HANDLE hNamedPipe,
4073: LPDWORD lpState,
4074: LPDWORD lpCurInstances,
4075: LPDWORD lpMaxCollectionCount,
4076: LPDWORD lpCollectDataTimeout,
4077: LPSTR lpUserName,
4078: DWORD nMaxUserNameSize
4079: );
4080: BOOL
1.1.1.2 root 4081: WINAPI
1.1 root 4082: GetNamedPipeHandleStateW(
4083: HANDLE hNamedPipe,
4084: LPDWORD lpState,
4085: LPDWORD lpCurInstances,
4086: LPDWORD lpMaxCollectionCount,
4087: LPDWORD lpCollectDataTimeout,
4088: LPWSTR lpUserName,
4089: DWORD nMaxUserNameSize
4090: );
4091: #ifdef UNICODE
4092: #define GetNamedPipeHandleState GetNamedPipeHandleStateW
4093: #else
4094: #define GetNamedPipeHandleState GetNamedPipeHandleStateA
4095: #endif // !UNICODE
4096:
4097: BOOL
1.1.1.2 root 4098: WINAPI
1.1 root 4099: CallNamedPipeA(
4100: LPSTR lpNamedPipeName,
4101: LPVOID lpInBuffer,
4102: DWORD nInBufferSize,
4103: LPVOID lpOutBuffer,
4104: DWORD nOutBufferSize,
4105: LPDWORD lpBytesRead,
4106: DWORD nTimeOut
4107: );
4108: BOOL
1.1.1.2 root 4109: WINAPI
1.1 root 4110: CallNamedPipeW(
4111: LPWSTR lpNamedPipeName,
4112: LPVOID lpInBuffer,
4113: DWORD nInBufferSize,
4114: LPVOID lpOutBuffer,
4115: DWORD nOutBufferSize,
4116: LPDWORD lpBytesRead,
4117: DWORD nTimeOut
4118: );
4119: #ifdef UNICODE
4120: #define CallNamedPipe CallNamedPipeW
4121: #else
4122: #define CallNamedPipe CallNamedPipeA
4123: #endif // !UNICODE
4124:
4125: BOOL
1.1.1.2 root 4126: WINAPI
1.1 root 4127: WaitNamedPipeA(
4128: LPSTR lpNamedPipeName,
4129: DWORD nTimeOut
4130: );
4131: BOOL
1.1.1.2 root 4132: WINAPI
1.1 root 4133: WaitNamedPipeW(
4134: LPWSTR lpNamedPipeName,
4135: DWORD nTimeOut
4136: );
4137: #ifdef UNICODE
4138: #define WaitNamedPipe WaitNamedPipeW
4139: #else
4140: #define WaitNamedPipe WaitNamedPipeA
4141: #endif // !UNICODE
4142:
4143: BOOL
1.1.1.2 root 4144: WINAPI
1.1 root 4145: GetVolumeInformationA(
4146: LPSTR lpRootPathName,
4147: LPSTR lpVolumeNameBuffer,
4148: DWORD nVolumeNameSize,
4149: LPDWORD lpVolumeSerialNumber,
4150: LPDWORD lpMaximumComponentLength,
4151: LPDWORD lpFileSystemFlags,
4152: LPSTR lpFileSystemNameBuffer,
4153: DWORD nFileSystemNameSize
4154: );
4155: BOOL
1.1.1.2 root 4156: WINAPI
1.1 root 4157: GetVolumeInformationW(
4158: LPWSTR lpRootPathName,
4159: LPWSTR lpVolumeNameBuffer,
4160: DWORD nVolumeNameSize,
4161: LPDWORD lpVolumeSerialNumber,
4162: LPDWORD lpMaximumComponentLength,
4163: LPDWORD lpFileSystemFlags,
4164: LPWSTR lpFileSystemNameBuffer,
4165: DWORD nFileSystemNameSize
4166: );
4167: #ifdef UNICODE
4168: #define GetVolumeInformation GetVolumeInformationW
4169: #else
4170: #define GetVolumeInformation GetVolumeInformationA
4171: #endif // !UNICODE
4172:
4173: //
4174: // Event logging APIs
4175: //
1.1.1.2 root 4176:
1.1 root 4177: BOOL
1.1.1.2 root 4178: WINAPI
1.1 root 4179: ClearEventLogA (
1.1.1.2 root 4180: HANDLE hEventLog,
4181: LPSTR lpBackupFileName
1.1 root 4182: );
4183: BOOL
1.1.1.2 root 4184: WINAPI
1.1 root 4185: ClearEventLogW (
1.1.1.2 root 4186: HANDLE hEventLog,
4187: LPWSTR lpBackupFileName
1.1 root 4188: );
4189: #ifdef UNICODE
4190: #define ClearEventLog ClearEventLogW
4191: #else
4192: #define ClearEventLog ClearEventLogA
4193: #endif // !UNICODE
4194:
4195: BOOL
1.1.1.2 root 4196: WINAPI
4197: BackupEventLogA (
4198: HANDLE hEventLog,
4199: LPSTR lpBackupFileName
4200: );
4201: BOOL
4202: WINAPI
4203: BackupEventLogW (
4204: HANDLE hEventLog,
4205: LPWSTR lpBackupFileName
4206: );
4207: #ifdef UNICODE
4208: #define BackupEventLog BackupEventLogW
4209: #else
4210: #define BackupEventLog BackupEventLogA
4211: #endif // !UNICODE
4212:
4213: BOOL
4214: WINAPI
1.1 root 4215: CloseEventLog (
1.1.1.2 root 4216: HANDLE hEventLog
4217: );
4218:
4219: BOOL
4220: WINAPI
4221: DeregisterEventSource (
4222: HANDLE hEventLog
4223: );
4224:
4225:
4226: BOOL
4227: WINAPI
4228: GetNumberOfEventLogRecords (
4229: HANDLE hEventLog,
4230: PDWORD NumberOfRecords
4231: );
4232:
4233: BOOL
4234: WINAPI
4235: GetOldestEventLogRecord (
4236: HANDLE hEventLog,
4237: PDWORD OldestRecord
1.1 root 4238: );
4239:
4240: HANDLE
1.1.1.2 root 4241: WINAPI
1.1 root 4242: OpenEventLogA (
1.1.1.2 root 4243: LPSTR lpUNCServerName,
4244: LPSTR lpSourceName
1.1 root 4245: );
4246: HANDLE
1.1.1.2 root 4247: WINAPI
1.1 root 4248: OpenEventLogW (
1.1.1.2 root 4249: LPWSTR lpUNCServerName,
4250: LPWSTR lpSourceName
1.1 root 4251: );
4252: #ifdef UNICODE
4253: #define OpenEventLog OpenEventLogW
4254: #else
4255: #define OpenEventLog OpenEventLogA
4256: #endif // !UNICODE
4257:
1.1.1.2 root 4258: HANDLE
4259: WINAPI
4260: RegisterEventSourceA (
4261: LPSTR lpUNCServerName,
4262: LPSTR lpSourceName
4263: );
4264: HANDLE
4265: WINAPI
4266: RegisterEventSourceW (
4267: LPWSTR lpUNCServerName,
4268: LPWSTR lpSourceName
4269: );
4270: #ifdef UNICODE
4271: #define RegisterEventSource RegisterEventSourceW
4272: #else
4273: #define RegisterEventSource RegisterEventSourceA
4274: #endif // !UNICODE
4275:
4276: HANDLE
4277: WINAPI
4278: OpenBackupEventLogA (
4279: LPSTR lpUNCServerName,
4280: LPSTR lpFileName
4281: );
4282: HANDLE
4283: WINAPI
4284: OpenBackupEventLogW (
4285: LPWSTR lpUNCServerName,
4286: LPWSTR lpFileName
4287: );
4288: #ifdef UNICODE
4289: #define OpenBackupEventLog OpenBackupEventLogW
4290: #else
4291: #define OpenBackupEventLog OpenBackupEventLogA
4292: #endif // !UNICODE
4293:
1.1 root 4294: BOOL
1.1.1.2 root 4295: WINAPI
1.1 root 4296: ReadEventLogA (
1.1.1.2 root 4297: HANDLE hEventLog,
4298: DWORD dwReadFlags,
4299: DWORD dwRecordOffset,
4300: LPVOID lpBuffer,
4301: DWORD nNumberOfBytesToRead,
4302: DWORD *pnBytesRead,
4303: DWORD *pnMinNumberOfBytesNeeded
1.1 root 4304: );
4305: BOOL
1.1.1.2 root 4306: WINAPI
1.1 root 4307: ReadEventLogW (
1.1.1.2 root 4308: HANDLE hEventLog,
4309: DWORD dwReadFlags,
4310: DWORD dwRecordOffset,
4311: LPVOID lpBuffer,
4312: DWORD nNumberOfBytesToRead,
4313: DWORD *pnBytesRead,
4314: DWORD *pnMinNumberOfBytesNeeded
1.1 root 4315: );
4316: #ifdef UNICODE
4317: #define ReadEventLog ReadEventLogW
4318: #else
4319: #define ReadEventLog ReadEventLogA
4320: #endif // !UNICODE
4321:
4322: BOOL
1.1.1.2 root 4323: WINAPI
4324: ReportEventA (
4325: HANDLE hEventLog,
4326: WORD wType,
4327: WORD wCategory,
4328: DWORD dwEventID,
4329: PSID lpUserSid,
4330: WORD wNumStrings,
4331: DWORD dwDataSize,
4332: LPSTR *lpStrings,
4333: LPVOID lpRawData
4334: );
4335: BOOL
4336: WINAPI
4337: ReportEventW (
4338: HANDLE hEventLog,
4339: WORD wType,
4340: WORD wCategory,
4341: DWORD dwEventID,
4342: PSID lpUserSid,
4343: WORD wNumStrings,
4344: DWORD dwDataSize,
4345: LPWSTR *lpStrings,
4346: LPVOID lpRawData
1.1 root 4347: );
4348: #ifdef UNICODE
1.1.1.2 root 4349: #define ReportEvent ReportEventW
1.1 root 4350: #else
1.1.1.2 root 4351: #define ReportEvent ReportEventA
1.1 root 4352: #endif // !UNICODE
1.1.1.2 root 4353:
1.1 root 4354: //
1.1.1.2 root 4355: //
4356: // Security APIs
4357: //
4358:
4359:
4360: BOOL
4361: WINAPI
4362: DuplicateToken(
4363: HANDLE ExistingTokenHandle,
4364: SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
4365: PHANDLE DuplicateTokenHandle
4366: );
4367:
4368: BOOL
4369: WINAPI
4370: GetKernelObjectSecurity (
4371: HANDLE Handle,
4372: SECURITY_INFORMATION RequestedInformation,
4373: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4374: DWORD nLength,
4375: LPDWORD lpnLengthNeeded
4376: );
4377:
4378: BOOL
4379: WINAPI
4380: ImpersonateNamedPipeClient(
4381: HANDLE hNamedPipe
4382: );
4383:
4384: BOOL
4385: WINAPI
4386: ImpersonateSelf(
4387: SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
4388: );
4389:
4390:
4391: BOOL
4392: WINAPI
4393: RevertToSelf (
4394: VOID
4395: );
4396:
4397:
4398: BOOL
4399: WINAPI
4400: AccessCheck (
4401: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4402: HANDLE ClientToken,
4403: DWORD DesiredAccess,
4404: PGENERIC_MAPPING GenericMapping,
4405: PPRIVILEGE_SET PrivilegeSet,
4406: LPDWORD PrivilegeSetLength,
4407: LPDWORD GrantedAccess,
4408: LPBOOL AccessStatus
4409: );
4410:
4411:
4412: BOOL
4413: WINAPI
4414: OpenProcessToken (
4415: HANDLE ProcessHandle,
4416: DWORD DesiredAccess,
4417: PHANDLE TokenHandle
4418: );
4419:
4420:
4421: BOOL
4422: WINAPI
4423: OpenThreadToken (
4424: HANDLE ThreadHandle,
4425: DWORD DesiredAccess,
4426: BOOL OpenAsSelf,
4427: PHANDLE TokenHandle
4428: );
4429:
4430:
4431: BOOL
4432: WINAPI
4433: GetTokenInformation (
4434: HANDLE TokenHandle,
4435: TOKEN_INFORMATION_CLASS TokenInformationClass,
4436: LPVOID TokenInformation,
4437: DWORD TokenInformationLength,
4438: PDWORD ReturnLength
4439: );
4440:
4441:
4442: BOOL
4443: WINAPI
4444: SetTokenInformation (
4445: HANDLE TokenHandle,
4446: TOKEN_INFORMATION_CLASS TokenInformationClass,
4447: LPVOID TokenInformation,
4448: DWORD TokenInformationLength
4449: );
4450:
4451:
4452: BOOL
4453: WINAPI
4454: AdjustTokenPrivileges (
4455: HANDLE TokenHandle,
4456: BOOL DisableAllPrivileges,
4457: PTOKEN_PRIVILEGES NewState,
4458: DWORD BufferLength,
4459: PTOKEN_PRIVILEGES PreviousState,
4460: PDWORD ReturnLength
4461: );
4462:
4463:
4464: BOOL
4465: WINAPI
4466: AdjustTokenGroups (
4467: HANDLE TokenHandle,
4468: BOOL ResetToDefault,
4469: PTOKEN_GROUPS NewState,
4470: DWORD BufferLength,
4471: PTOKEN_GROUPS PreviousState,
4472: PDWORD ReturnLength
4473: );
4474:
4475:
4476: BOOL
4477: WINAPI
4478: PrivilegeCheck (
4479: HANDLE ClientToken,
4480: PPRIVILEGE_SET RequiredPrivileges,
4481: LPBOOL pfResult
4482: );
4483:
4484:
4485: BOOL
4486: WINAPI
4487: AccessCheckAndAuditAlarmA (
4488: LPSTR SubsystemName,
4489: LPVOID HandleId,
4490: LPSTR ObjectTypeName,
4491: LPSTR ObjectName,
4492: PSECURITY_DESCRIPTOR SecurityDescriptor,
4493: DWORD DesiredAccess,
4494: PGENERIC_MAPPING GenericMapping,
4495: BOOL ObjectCreation,
4496: LPDWORD GrantedAccess,
4497: LPBOOL AccessStatus,
4498: LPBOOL pfGenerateOnClose
4499: );
4500: BOOL
4501: WINAPI
4502: AccessCheckAndAuditAlarmW (
4503: LPWSTR SubsystemName,
4504: LPVOID HandleId,
4505: LPWSTR ObjectTypeName,
4506: LPWSTR ObjectName,
4507: PSECURITY_DESCRIPTOR SecurityDescriptor,
4508: DWORD DesiredAccess,
4509: PGENERIC_MAPPING GenericMapping,
4510: BOOL ObjectCreation,
4511: LPDWORD GrantedAccess,
4512: LPBOOL AccessStatus,
4513: LPBOOL pfGenerateOnClose
4514: );
4515: #ifdef UNICODE
4516: #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW
4517: #else
4518: #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA
4519: #endif // !UNICODE
4520:
4521:
4522: BOOL
4523: WINAPI
4524: ObjectOpenAuditAlarmA (
4525: LPSTR SubsystemName,
4526: LPVOID HandleId,
4527: LPSTR ObjectTypeName,
4528: LPSTR ObjectName,
4529: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4530: HANDLE ClientToken,
4531: DWORD DesiredAccess,
4532: DWORD GrantedAccess,
4533: PPRIVILEGE_SET Privileges,
4534: BOOL ObjectCreation,
4535: BOOL AccessGranted,
4536: LPBOOL GenerateOnClose
4537: );
4538: BOOL
4539: WINAPI
4540: ObjectOpenAuditAlarmW (
4541: LPWSTR SubsystemName,
4542: LPVOID HandleId,
4543: LPWSTR ObjectTypeName,
4544: LPWSTR ObjectName,
4545: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4546: HANDLE ClientToken,
4547: DWORD DesiredAccess,
4548: DWORD GrantedAccess,
4549: PPRIVILEGE_SET Privileges,
4550: BOOL ObjectCreation,
4551: BOOL AccessGranted,
4552: LPBOOL GenerateOnClose
4553: );
4554: #ifdef UNICODE
4555: #define ObjectOpenAuditAlarm ObjectOpenAuditAlarmW
4556: #else
4557: #define ObjectOpenAuditAlarm ObjectOpenAuditAlarmA
4558: #endif // !UNICODE
4559:
4560:
4561: BOOL
4562: WINAPI
4563: ObjectPrivilegeAuditAlarmA (
4564: LPSTR SubsystemName,
4565: LPVOID HandleId,
4566: HANDLE ClientToken,
4567: DWORD DesiredAccess,
4568: PPRIVILEGE_SET Privileges,
4569: BOOL AccessGranted
4570: );
4571: BOOL
4572: WINAPI
4573: ObjectPrivilegeAuditAlarmW (
4574: LPWSTR SubsystemName,
4575: LPVOID HandleId,
4576: HANDLE ClientToken,
4577: DWORD DesiredAccess,
4578: PPRIVILEGE_SET Privileges,
4579: BOOL AccessGranted
4580: );
4581: #ifdef UNICODE
4582: #define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmW
4583: #else
4584: #define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmA
4585: #endif // !UNICODE
4586:
4587:
4588: BOOL
4589: WINAPI
4590: ObjectCloseAuditAlarmA (
4591: LPSTR SubsystemName,
4592: LPVOID HandleId,
4593: BOOL GenerateOnClose
4594: );
4595: BOOL
4596: WINAPI
4597: ObjectCloseAuditAlarmW (
4598: LPWSTR SubsystemName,
4599: LPVOID HandleId,
4600: BOOL GenerateOnClose
4601: );
4602: #ifdef UNICODE
4603: #define ObjectCloseAuditAlarm ObjectCloseAuditAlarmW
4604: #else
4605: #define ObjectCloseAuditAlarm ObjectCloseAuditAlarmA
4606: #endif // !UNICODE
4607:
4608:
4609: BOOL
4610: WINAPI
4611: PrivilegedServiceAuditAlarmA (
4612: LPSTR SubsystemName,
4613: LPSTR ServiceName,
4614: HANDLE ClientToken,
4615: PPRIVILEGE_SET Privileges,
4616: BOOL AccessGranted
4617: );
4618: BOOL
4619: WINAPI
4620: PrivilegedServiceAuditAlarmW (
4621: LPWSTR SubsystemName,
4622: LPWSTR ServiceName,
4623: HANDLE ClientToken,
4624: PPRIVILEGE_SET Privileges,
4625: BOOL AccessGranted
4626: );
4627: #ifdef UNICODE
4628: #define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmW
4629: #else
4630: #define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmA
4631: #endif // !UNICODE
4632:
4633:
4634: BOOL
4635: WINAPI
4636: IsValidSid (
4637: PSID pSid
4638: );
4639:
4640:
4641: BOOL
4642: WINAPI
4643: EqualSid (
4644: PSID pSid1,
4645: PSID pSid2
4646: );
4647:
4648:
4649: BOOL
4650: WINAPI
4651: EqualPrefixSid (
4652: PSID pSid1,
4653: PSID pSid2
4654: );
4655:
4656:
4657: DWORD
4658: WINAPI
4659: GetSidLengthRequired (
4660: UCHAR nSubAuthorityCount
4661: );
4662:
4663:
4664: BOOL
4665: WINAPI
4666: AllocateAndInitializeSid (
4667: PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
4668: BYTE nSubAuthorityCount,
4669: DWORD nSubAuthority0,
4670: DWORD nSubAuthority1,
4671: DWORD nSubAuthority2,
4672: DWORD nSubAuthority3,
4673: DWORD nSubAuthority4,
4674: DWORD nSubAuthority5,
4675: DWORD nSubAuthority6,
4676: DWORD nSubAuthority7,
4677: PSID *pSid
4678: );
4679:
4680: PVOID
4681: WINAPI
4682: FreeSid(
4683: PSID pSid
4684: );
4685:
4686: BOOL
4687: WINAPI
4688: InitializeSid (
4689: PSID Sid,
4690: PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
4691: BYTE nSubAuthorityCount
4692: );
4693:
4694:
4695: PSID_IDENTIFIER_AUTHORITY
4696: WINAPI
4697: GetSidIdentifierAuthority (
4698: PSID pSid
4699: );
4700:
4701:
4702: PDWORD
4703: WINAPI
4704: GetSidSubAuthority (
4705: PSID pSid,
4706: DWORD nSubAuthority
4707: );
4708:
4709:
4710: PUCHAR
4711: WINAPI
4712: GetSidSubAuthorityCount (
4713: PSID pSid
4714: );
4715:
4716:
4717: DWORD
4718: WINAPI
4719: GetLengthSid (
4720: PSID pSid
4721: );
4722:
4723:
4724: BOOL
4725: WINAPI
4726: CopySid (
4727: DWORD nDestinationSidLength,
4728: PSID pDestinationSid,
4729: PSID pSourceSid
4730: );
4731:
4732:
4733: BOOL
4734: WINAPI
4735: AreAllAccessesGranted (
4736: DWORD GrantedAccess,
4737: DWORD DesiredAccess
4738: );
4739:
4740:
4741: BOOL
4742: WINAPI
4743: AreAnyAccessesGranted (
4744: DWORD GrantedAccess,
4745: DWORD DesiredAccess
4746: );
4747:
4748:
4749: VOID
4750: WINAPI
4751: MapGenericMask (
4752: PDWORD AccessMask,
4753: PGENERIC_MAPPING GenericMapping
4754: );
4755:
4756:
4757: BOOL
4758: WINAPI
4759: IsValidAcl (
4760: PACL pAcl
4761: );
4762:
4763:
4764: BOOL
4765: WINAPI
4766: InitializeAcl (
4767: PACL pAcl,
4768: DWORD nAclLength,
4769: DWORD dwAclRevision
4770: );
4771:
4772:
4773: BOOL
4774: WINAPI
4775: GetAclInformation (
4776: PACL pAcl,
4777: LPVOID pAclInformation,
4778: DWORD nAclInformationLength,
4779: ACL_INFORMATION_CLASS dwAclInformationClass
4780: );
4781:
4782:
4783: BOOL
4784: WINAPI
4785: SetAclInformation (
4786: PACL pAcl,
4787: LPVOID pAclInformation,
4788: DWORD nAclInformationLength,
4789: ACL_INFORMATION_CLASS dwAclInformationClass
4790: );
4791:
4792:
4793: BOOL
4794: WINAPI
4795: AddAce (
4796: PACL pAcl,
4797: DWORD dwAceRevision,
4798: DWORD dwStartingAceIndex,
4799: LPVOID pAceList,
4800: DWORD nAceListLength
4801: );
4802:
4803:
4804: BOOL
4805: WINAPI
4806: DeleteAce (
4807: PACL pAcl,
4808: DWORD dwAceIndex
4809: );
4810:
4811:
4812: BOOL
4813: WINAPI
4814: GetAce (
4815: PACL pAcl,
4816: DWORD dwAceIndex,
4817: LPVOID *pAce
4818: );
4819:
4820:
4821: BOOL
4822: WINAPI
4823: AddAccessAllowedAce (
4824: PACL pAcl,
4825: DWORD dwAceRevision,
4826: DWORD AccessMask,
4827: PSID pSid
4828: );
4829:
4830:
4831: BOOL
4832: WINAPI
4833: AddAccessDeniedAce (
4834: PACL pAcl,
4835: DWORD dwAceRevision,
4836: DWORD AccessMask,
4837: PSID pSid
4838: );
4839:
4840:
4841: BOOL
4842: WINAPI
4843: AddAuditAccessAce(
4844: PACL pAcl,
4845: DWORD dwAceRevision,
4846: DWORD dwAccessMask,
4847: PSID pSid,
4848: BOOL bAuditSuccess,
4849: BOOL bAuditFailure
4850: );
4851:
4852:
4853: BOOL
4854: WINAPI
4855: FindFirstFreeAce (
4856: PACL pAcl,
4857: LPVOID *pAce
4858: );
4859:
4860:
4861: BOOL
4862: WINAPI
4863: InitializeSecurityDescriptor (
4864: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4865: DWORD dwRevision
4866: );
4867:
4868:
4869: BOOL
4870: WINAPI
4871: IsValidSecurityDescriptor (
4872: PSECURITY_DESCRIPTOR pSecurityDescriptor
4873: );
4874:
4875:
4876: DWORD
4877: WINAPI
4878: GetSecurityDescriptorLength (
4879: PSECURITY_DESCRIPTOR pSecurityDescriptor
4880: );
4881:
4882:
4883: BOOL
4884: WINAPI
4885: GetSecurityDescriptorControl (
4886: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4887: PSECURITY_DESCRIPTOR_CONTROL pControl,
4888: LPDWORD lpdwRevision
4889: );
4890:
4891:
4892: BOOL
4893: WINAPI
4894: SetSecurityDescriptorDacl (
4895: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4896: BOOL bDaclPresent,
4897: PACL pDacl,
4898: BOOL bDaclDefaulted
4899: );
4900:
4901:
4902: BOOL
4903: WINAPI
4904: GetSecurityDescriptorDacl (
4905: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4906: LPBOOL lpbDaclPresent,
4907: PACL *pDacl,
4908: LPBOOL lpbDaclDefaulted
4909: );
4910:
4911:
4912: BOOL
4913: WINAPI
4914: SetSecurityDescriptorSacl (
4915: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4916: BOOL bSaclPresent,
4917: PACL pSacl,
4918: BOOL bSaclDefaulted
4919: );
4920:
4921:
4922: BOOL
4923: WINAPI
4924: GetSecurityDescriptorSacl (
4925: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4926: LPBOOL lpbSaclPresent,
4927: PACL *pSacl,
4928: LPBOOL lpbSaclDefaulted
4929: );
4930:
4931:
4932: BOOL
4933: WINAPI
4934: SetSecurityDescriptorOwner (
4935: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4936: PSID pOwner,
4937: BOOL bOwnerDefaulted
4938: );
4939:
4940:
4941: BOOL
4942: WINAPI
4943: GetSecurityDescriptorOwner (
4944: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4945: PSID *pOwner,
4946: LPBOOL lpbOwnerDefaulted
4947: );
4948:
4949:
4950: BOOL
4951: WINAPI
4952: SetSecurityDescriptorGroup (
4953: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4954: PSID pGroup,
4955: BOOL bGroupDefaulted
4956: );
4957:
4958:
4959: BOOL
4960: WINAPI
4961: GetSecurityDescriptorGroup (
4962: PSECURITY_DESCRIPTOR pSecurityDescriptor,
4963: PSID *pGroup,
4964: LPBOOL lpbGroupDefaulted
4965: );
4966:
4967:
4968: BOOL
4969: WINAPI
4970: CreatePrivateObjectSecurity (
4971: PSECURITY_DESCRIPTOR ParentDescriptor,
4972: PSECURITY_DESCRIPTOR CreatorDescriptor,
4973: PSECURITY_DESCRIPTOR * NewDescriptor,
4974: BOOL IsDirectoryObject,
4975: HANDLE Token,
4976: PGENERIC_MAPPING GenericMapping
4977: );
4978:
4979:
4980: BOOL
4981: WINAPI
4982: SetPrivateObjectSecurity (
4983: SECURITY_INFORMATION SecurityInformation,
4984: PSECURITY_DESCRIPTOR ModificationDescriptor,
4985: PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
4986: PGENERIC_MAPPING GenericMapping,
4987: HANDLE Token
4988: );
4989:
4990:
4991: BOOL
4992: WINAPI
4993: GetPrivateObjectSecurity (
4994: PSECURITY_DESCRIPTOR ObjectDescriptor,
4995: SECURITY_INFORMATION SecurityInformation,
4996: PSECURITY_DESCRIPTOR ResultantDescriptor,
4997: DWORD DescriptorLength,
4998: PDWORD ReturnLength
4999: );
5000:
5001:
5002: BOOL
5003: WINAPI
5004: DestroyPrivateObjectSecurity (
5005: PSECURITY_DESCRIPTOR * ObjectDescriptor
5006: );
5007:
5008:
5009: BOOL
5010: WINAPI
5011: MakeSelfRelativeSD (
5012: PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
5013: PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
5014: LPDWORD lpdwBufferLength
5015: );
5016:
5017:
5018: BOOL
5019: WINAPI
5020: MakeAbsoluteSD (
5021: PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
5022: PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
5023: LPDWORD lpdwAbsoluteSecurityDescriptorSize,
5024: PACL pDacl,
5025: LPDWORD lpdwDaclSize,
5026: PACL pSacl,
5027: LPDWORD lpdwSaclSize,
5028: PSID pOwner,
5029: LPDWORD lpdwOwnerSize,
5030: PSID pPrimaryGroup,
5031: LPDWORD lpdwPrimaryGroupSize
5032: );
5033:
5034:
5035: BOOL
5036: WINAPI
5037: SetFileSecurityA (
5038: LPSTR lpFileName,
5039: SECURITY_INFORMATION SecurityInformation,
5040: PSECURITY_DESCRIPTOR pSecurityDescriptor
5041: );
5042: BOOL
5043: WINAPI
5044: SetFileSecurityW (
5045: LPWSTR lpFileName,
5046: SECURITY_INFORMATION SecurityInformation,
5047: PSECURITY_DESCRIPTOR pSecurityDescriptor
5048: );
5049: #ifdef UNICODE
5050: #define SetFileSecurity SetFileSecurityW
5051: #else
5052: #define SetFileSecurity SetFileSecurityA
5053: #endif // !UNICODE
5054:
5055:
5056: BOOL
5057: WINAPI
5058: GetFileSecurityA (
5059: LPSTR lpFileName,
5060: SECURITY_INFORMATION RequestedInformation,
5061: PSECURITY_DESCRIPTOR pSecurityDescriptor,
5062: DWORD nLength,
5063: LPDWORD lpnLengthNeeded
5064: );
5065: BOOL
5066: WINAPI
5067: GetFileSecurityW (
5068: LPWSTR lpFileName,
5069: SECURITY_INFORMATION RequestedInformation,
5070: PSECURITY_DESCRIPTOR pSecurityDescriptor,
5071: DWORD nLength,
5072: LPDWORD lpnLengthNeeded
5073: );
5074: #ifdef UNICODE
5075: #define GetFileSecurity GetFileSecurityW
5076: #else
5077: #define GetFileSecurity GetFileSecurityA
5078: #endif // !UNICODE
5079:
5080:
5081: BOOL
5082: WINAPI
5083: SetKernelObjectSecurity (
5084: HANDLE Handle,
5085: SECURITY_INFORMATION SecurityInformation,
5086: PSECURITY_DESCRIPTOR SecurityDescriptor
5087: );
5088:
5089:
5090:
5091: HANDLE
5092: WINAPI
5093: FindFirstChangeNotificationA(
5094: LPSTR lpPathName,
5095: BOOL bWatchSubtree,
5096: DWORD dwNotifyFilter
5097: );
5098: HANDLE
5099: WINAPI
5100: FindFirstChangeNotificationW(
5101: LPWSTR lpPathName,
5102: BOOL bWatchSubtree,
5103: DWORD dwNotifyFilter
5104: );
5105: #ifdef UNICODE
5106: #define FindFirstChangeNotification FindFirstChangeNotificationW
5107: #else
5108: #define FindFirstChangeNotification FindFirstChangeNotificationA
5109: #endif // !UNICODE
5110: BOOL
5111: WINAPI
5112: FindNextChangeNotification(
5113: HANDLE hChangeHandle
5114: );
5115:
5116: BOOL
5117: WINAPI
5118: FindCloseChangeNotification(
5119: HANDLE hChangeHandle
5120: );
5121:
5122: BOOL
5123: WINAPI
5124: VirtualLock(
5125: LPVOID lpAddress,
5126: DWORD dwSize
5127: );
5128:
5129: BOOL
5130: WINAPI
5131: VirtualUnlock(
5132: LPVOID lpAddress,
5133: DWORD dwSize
5134: );
5135:
5136: LPVOID
5137: WINAPI
5138: MapViewOfFileEx(
5139: HANDLE hFileMappingObject,
5140: DWORD dwDesiredAccess,
5141: DWORD dwFileOffsetHigh,
5142: DWORD dwFileOffsetLow,
5143: DWORD dwNumberOfBytesToMap,
5144: LPVOID lpBaseAddress
5145: );
5146:
5147: BOOL
5148: WINAPI
5149: SetPriorityClass(
5150: HANDLE hProcess,
5151: DWORD dwPriorityClass
5152: );
5153:
5154: DWORD
5155: WINAPI
5156: GetPriorityClass(
5157: HANDLE hProcess
5158: );
5159:
5160: BOOL
5161: WINAPI
5162: IsBadReadPtr(
5163: CONST VOID *lp,
5164: UINT ucb
5165: );
5166:
5167: BOOL
5168: WINAPI
5169: IsBadWritePtr(
5170: LPVOID lp,
5171: UINT ucb
5172: );
5173:
5174: BOOL
5175: WINAPI
5176: IsBadHugeReadPtr(
5177: CONST VOID *lp,
5178: UINT ucb
5179: );
5180:
5181: BOOL
5182: WINAPI
5183: IsBadHugeWritePtr(
5184: LPVOID lp,
5185: UINT ucb
5186: );
5187:
5188: BOOL
5189: WINAPI
5190: IsBadCodePtr(
5191: FARPROC lpfn
5192: );
5193:
5194: BOOL
5195: WINAPI
5196: IsBadStringPtrA(
5197: LPCSTR lpsz,
5198: UINT ucchMax
5199: );
5200: BOOL
5201: WINAPI
5202: IsBadStringPtrW(
5203: LPCWSTR lpsz,
5204: UINT ucchMax
5205: );
5206: #ifdef UNICODE
5207: #define IsBadStringPtr IsBadStringPtrW
5208: #else
5209: #define IsBadStringPtr IsBadStringPtrA
5210: #endif // !UNICODE
5211:
5212: BOOL
5213: WINAPI
5214: LookupAccountSidA(
5215: LPSTR lpSystemName,
5216: PSID Sid,
5217: LPSTR Name,
5218: LPDWORD cbName,
5219: LPSTR ReferencedDomainName,
5220: LPDWORD cbReferencedDomainName,
5221: PSID_NAME_USE peUse
5222: );
5223: BOOL
5224: WINAPI
5225: LookupAccountSidW(
5226: LPWSTR lpSystemName,
5227: PSID Sid,
5228: LPWSTR Name,
5229: LPDWORD cbName,
5230: LPWSTR ReferencedDomainName,
5231: LPDWORD cbReferencedDomainName,
5232: PSID_NAME_USE peUse
5233: );
5234: #ifdef UNICODE
5235: #define LookupAccountSid LookupAccountSidW
5236: #else
5237: #define LookupAccountSid LookupAccountSidA
5238: #endif // !UNICODE
5239:
5240: BOOL
5241: WINAPI
5242: LookupAccountNameA(
5243: LPSTR lpSystemName,
5244: LPSTR lpAccountName,
5245: PSID Sid,
5246: LPDWORD cbSid,
5247: LPSTR ReferencedDomainName,
5248: LPDWORD cbReferencedDomainName,
5249: PSID_NAME_USE peUse
5250: );
5251: BOOL
5252: WINAPI
5253: LookupAccountNameW(
5254: LPWSTR lpSystemName,
5255: LPWSTR lpAccountName,
5256: PSID Sid,
5257: LPDWORD cbSid,
5258: LPWSTR ReferencedDomainName,
5259: LPDWORD cbReferencedDomainName,
5260: PSID_NAME_USE peUse
5261: );
5262: #ifdef UNICODE
5263: #define LookupAccountName LookupAccountNameW
5264: #else
5265: #define LookupAccountName LookupAccountNameA
5266: #endif // !UNICODE
5267:
5268: BOOL
5269: WINAPI
5270: LookupPrivilegeValueA(
5271: LPSTR lpSystemName,
5272: LPSTR lpName,
5273: PLUID lpLuid
5274: );
5275: BOOL
5276: WINAPI
5277: LookupPrivilegeValueW(
5278: LPWSTR lpSystemName,
5279: LPWSTR lpName,
5280: PLUID lpLuid
5281: );
5282: #ifdef UNICODE
5283: #define LookupPrivilegeValue LookupPrivilegeValueW
5284: #else
5285: #define LookupPrivilegeValue LookupPrivilegeValueA
5286: #endif // !UNICODE
5287:
5288: BOOL
5289: WINAPI
5290: LookupPrivilegeNameA(
5291: LPSTR lpSystemName,
5292: PLUID lpLuid,
5293: LPSTR lpName,
5294: LPDWORD cbName
5295: );
5296: BOOL
5297: WINAPI
5298: LookupPrivilegeNameW(
5299: LPWSTR lpSystemName,
5300: PLUID lpLuid,
5301: LPWSTR lpName,
5302: LPDWORD cbName
5303: );
5304: #ifdef UNICODE
5305: #define LookupPrivilegeName LookupPrivilegeNameW
5306: #else
5307: #define LookupPrivilegeName LookupPrivilegeNameA
5308: #endif // !UNICODE
5309:
5310: BOOL
5311: WINAPI
5312: LookupPrivilegeDisplayNameA(
5313: LPSTR lpSystemName,
5314: LPSTR lpName,
5315: LPSTR lpDisplayName,
5316: LPDWORD cbDisplayName,
5317: LPDWORD lpLanguageId
5318: );
5319: BOOL
5320: WINAPI
5321: LookupPrivilegeDisplayNameW(
5322: LPWSTR lpSystemName,
5323: LPWSTR lpName,
5324: LPWSTR lpDisplayName,
5325: LPDWORD cbDisplayName,
5326: LPDWORD lpLanguageId
5327: );
5328: #ifdef UNICODE
5329: #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW
5330: #else
5331: #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameA
5332: #endif // !UNICODE
5333:
5334: BOOL
5335: WINAPI
5336: AllocateLocallyUniqueId(
5337: PLUID Luid
5338: );
5339:
5340: BOOL
5341: WINAPI
5342: BuildCommDCBA(
5343: LPSTR lpDef,
5344: LPDCB lpDCB
5345: );
5346: BOOL
5347: WINAPI
5348: BuildCommDCBW(
5349: LPWSTR lpDef,
5350: LPDCB lpDCB
5351: );
5352: #ifdef UNICODE
5353: #define BuildCommDCB BuildCommDCBW
5354: #else
5355: #define BuildCommDCB BuildCommDCBA
5356: #endif // !UNICODE
5357:
1.1.1.3 ! root 5358: #define MAX_COMPUTERNAME_LENGTH 15
1.1.1.2 root 5359:
5360: BOOL
5361: WINAPI
5362: GetComputerNameA (
5363: LPSTR lpBuffer,
5364: LPDWORD nSize
5365: );
5366: BOOL
5367: WINAPI
5368: GetComputerNameW (
5369: LPWSTR lpBuffer,
5370: LPDWORD nSize
5371: );
5372: #ifdef UNICODE
5373: #define GetComputerName GetComputerNameW
5374: #else
5375: #define GetComputerName GetComputerNameA
5376: #endif // !UNICODE
5377:
5378: BOOL
5379: WINAPI
5380: SetComputerNameA (
5381: LPSTR lpComputerName
5382: );
5383: BOOL
5384: WINAPI
5385: SetComputerNameW (
5386: LPWSTR lpComputerName
5387: );
5388: #ifdef UNICODE
5389: #define SetComputerName SetComputerNameW
5390: #else
5391: #define SetComputerName SetComputerNameA
5392: #endif // !UNICODE
5393:
5394: BOOL
5395: WINAPI
5396: GetUserNameA (
5397: LPSTR lpBuffer,
5398: LPDWORD nSize
5399: );
5400: BOOL
5401: WINAPI
5402: GetUserNameW (
5403: LPWSTR lpBuffer,
5404: LPDWORD nSize
5405: );
5406: #ifdef UNICODE
5407: #define GetUserName GetUserNameW
5408: #else
5409: #define GetUserName GetUserNameA
5410: #endif // !UNICODE
5411:
5412: //
5413: // Performance counter API's
5414: //
5415:
5416: BOOL
5417: WINAPI
5418: QueryPerformanceCounter(
5419: LARGE_INTEGER *lpPerformanceCount
5420: );
5421:
5422: BOOL
5423: WINAPI
5424: QueryPerformanceFrequency(
5425: LARGE_INTEGER *lpFrequency
5426: );
5427:
5428:
5429:
1.1 root 5430: // DOS and OS/2 Compatible Error Code definitions returned by the Win32 Base
5431: // API functions.
5432: //
5433:
5434: #include <winerror.h>
5435:
5436: /* Abnormal termination codes */
5437:
5438: #define TC_NORMAL 0
5439: #define TC_HARDERR 1
5440: #define TC_GP_TRAP 2
5441: #define TC_SIGNAL 3
5442:
1.1.1.3 ! root 5443: #ifdef __cplusplus
! 5444: }
! 5445: #endif
! 5446:
1.1 root 5447: #endif // _WINBASE_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.