1 : /************************************************************************
2 : * *
3 : * winbase.h -- This module defines the 32-Bit Windows Base APIs *
4 : * *
5 : * Copyright (c) Microsoft Corp. All rights reserved. *
6 : * *
7 : ************************************************************************/
8 : #ifndef _WINBASE_
9 : #define _WINBASE_
10 :
11 :
12 : #if _MSC_VER > 1000
13 : #pragma once
14 : #endif
15 :
16 : #ifdef _MAC
17 : #include <macwin32.h>
18 : #endif //_MAC
19 :
20 : //
21 : // Define API decoration for direct importing of DLL references.
22 : //
23 :
24 : #if !defined(_ADVAPI32_)
25 : #define WINADVAPI DECLSPEC_IMPORT
26 : #else
27 : #define WINADVAPI
28 : #endif
29 :
30 : #if !defined(_KERNEL32_)
31 : #define WINBASEAPI DECLSPEC_IMPORT
32 : #else
33 : #define WINBASEAPI
34 : #endif
35 :
36 : #if !defined(_ZAWPROXY_)
37 : #define ZAWPROXYAPI DECLSPEC_IMPORT
38 : #else
39 : #define ZAWPROXYAPI
40 : #endif
41 :
42 : #ifdef __cplusplus
43 : extern "C" {
44 : #endif
45 :
46 : /*
47 : * Compatibility macros
48 : */
49 :
50 : #define DefineHandleTable(w) ((w),TRUE)
51 : #define LimitEmsPages(dw)
52 : #define SetSwapAreaSize(w) (w)
53 : #define LockSegment(w) GlobalFix((HANDLE)(w))
54 : #define UnlockSegment(w) GlobalUnfix((HANDLE)(w))
55 : #define GetCurrentTime() GetTickCount()
56 :
57 : #define Yield()
58 :
59 : #define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1)
60 : #define INVALID_FILE_SIZE ((DWORD)0xFFFFFFFF)
61 : #define INVALID_SET_FILE_POINTER ((DWORD)-1)
62 : #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
63 :
64 : #define FILE_BEGIN 0
65 : #define FILE_CURRENT 1
66 : #define FILE_END 2
67 :
68 : #define TIME_ZONE_ID_INVALID ((DWORD)0xFFFFFFFF)
69 :
70 : #define WAIT_FAILED ((DWORD)0xFFFFFFFF)
71 : #define WAIT_OBJECT_0 ((STATUS_WAIT_0 ) + 0 )
72 :
73 : #define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0 ) + 0 )
74 : #define WAIT_ABANDONED_0 ((STATUS_ABANDONED_WAIT_0 ) + 0 )
75 :
76 : #define WAIT_IO_COMPLETION STATUS_USER_APC
77 : #define STILL_ACTIVE STATUS_PENDING
78 : #define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
79 : #define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
80 : #define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
81 : #define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
82 : #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
83 : #define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
84 : #define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
85 : #define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
86 : #define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
87 : #define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
88 : #define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
89 : #define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
90 : #define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
91 : #define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
92 : #define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
93 : #define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR
94 : #define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION
95 : #define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION
96 : #define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW
97 : #define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION
98 : #define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION
99 : #define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE
100 : #define EXCEPTION_POSSIBLE_DEADLOCK STATUS_POSSIBLE_DEADLOCK
101 : #define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT
102 :
103 : #define MoveMemory RtlMoveMemory
104 : #define CopyMemory RtlCopyMemory
105 : #define FillMemory RtlFillMemory
106 : #define ZeroMemory RtlZeroMemory
107 : #define SecureZeroMemory RtlSecureZeroMemory
108 : #define CaptureStackBackTrace RtlCaptureStackBackTrace
109 :
110 : //
111 : // File creation flags must start at the high end since they
112 : // are combined with the attributes
113 : //
114 :
115 : #define FILE_FLAG_WRITE_THROUGH 0x80000000
116 : #define FILE_FLAG_OVERLAPPED 0x40000000
117 : #define FILE_FLAG_NO_BUFFERING 0x20000000
118 : #define FILE_FLAG_RANDOM_ACCESS 0x10000000
119 : #define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000
120 : #define FILE_FLAG_DELETE_ON_CLOSE 0x04000000
121 : #define FILE_FLAG_BACKUP_SEMANTICS 0x02000000
122 : #define FILE_FLAG_POSIX_SEMANTICS 0x01000000
123 : #define FILE_FLAG_OPEN_REPARSE_POINT 0x00200000
124 : #define FILE_FLAG_OPEN_NO_RECALL 0x00100000
125 : #define FILE_FLAG_FIRST_PIPE_INSTANCE 0x00080000
126 :
127 : #define CREATE_NEW 1
128 : #define CREATE_ALWAYS 2
129 : #define OPEN_EXISTING 3
130 : #define OPEN_ALWAYS 4
131 : #define TRUNCATE_EXISTING 5
132 :
133 : #if(_WIN32_WINNT >= 0x0400)
134 : //
135 : // Define possible return codes from the CopyFileEx callback routine
136 : //
137 :
138 : #define PROGRESS_CONTINUE 0
139 : #define PROGRESS_CANCEL 1
140 : #define PROGRESS_STOP 2
141 : #define PROGRESS_QUIET 3
142 :
143 : //
144 : // Define CopyFileEx callback routine state change values
145 : //
146 :
147 : #define CALLBACK_CHUNK_FINISHED 0x00000000
148 : #define CALLBACK_STREAM_SWITCH 0x00000001
149 :
150 : //
151 : // Define CopyFileEx option flags
152 : //
153 :
154 : #define COPY_FILE_FAIL_IF_EXISTS 0x00000001
155 : #define COPY_FILE_RESTARTABLE 0x00000002
156 : #define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x00000004
157 : #define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x00000008
158 :
159 : //
160 : // Gap for private copyfile flags
161 : //
162 :
163 : #if (_WIN32_WINNT >= 0x0600)
164 : #define COPY_FILE_COPY_SYMLINK 0x00000800
165 : #endif
166 : #endif /* _WIN32_WINNT >= 0x0400 */
167 :
168 : #if (_WIN32_WINNT >= 0x0500)
169 : //
170 : // Define ReplaceFile option flags
171 : //
172 :
173 : #define REPLACEFILE_WRITE_THROUGH 0x00000001
174 : #define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002
175 :
176 : #endif // #if (_WIN32_WINNT >= 0x0500)
177 :
178 : //
179 : // Define the NamedPipe definitions
180 : //
181 :
182 :
183 : //
184 : // Define the dwOpenMode values for CreateNamedPipe
185 : //
186 :
187 : #define PIPE_ACCESS_INBOUND 0x00000001
188 : #define PIPE_ACCESS_OUTBOUND 0x00000002
189 : #define PIPE_ACCESS_DUPLEX 0x00000003
190 :
191 : //
192 : // Define the Named Pipe End flags for GetNamedPipeInfo
193 : //
194 :
195 : #define PIPE_CLIENT_END 0x00000000
196 : #define PIPE_SERVER_END 0x00000001
197 :
198 : //
199 : // Define the dwPipeMode values for CreateNamedPipe
200 : //
201 :
202 : #define PIPE_WAIT 0x00000000
203 : #define PIPE_NOWAIT 0x00000001
204 : #define PIPE_READMODE_BYTE 0x00000000
205 : #define PIPE_READMODE_MESSAGE 0x00000002
206 : #define PIPE_TYPE_BYTE 0x00000000
207 : #define PIPE_TYPE_MESSAGE 0x00000004
208 : #define PIPE_ACCEPT_REMOTE_CLIENTS 0x00000000
209 : #define PIPE_REJECT_REMOTE_CLIENTS 0x00000008
210 :
211 : //
212 : // Define the well known values for CreateNamedPipe nMaxInstances
213 : //
214 :
215 : #define PIPE_UNLIMITED_INSTANCES 255
216 :
217 : //
218 : // Define the Security Quality of Service bits to be passed
219 : // into CreateFile
220 : //
221 :
222 : #define SECURITY_ANONYMOUS ( SecurityAnonymous << 16 )
223 : #define SECURITY_IDENTIFICATION ( SecurityIdentification << 16 )
224 : #define SECURITY_IMPERSONATION ( SecurityImpersonation << 16 )
225 : #define SECURITY_DELEGATION ( SecurityDelegation << 16 )
226 :
227 : #define SECURITY_CONTEXT_TRACKING 0x00040000
228 : #define SECURITY_EFFECTIVE_ONLY 0x00080000
229 :
230 : #define SECURITY_SQOS_PRESENT 0x00100000
231 : #define SECURITY_VALID_SQOS_FLAGS 0x001F0000
232 :
233 : //
234 : // File structures
235 : //
236 :
237 : typedef struct _OVERLAPPED {
238 : ULONG_PTR Internal;
239 : ULONG_PTR InternalHigh;
240 : union {
241 : struct {
242 : DWORD Offset;
243 : DWORD OffsetHigh;
244 : };
245 :
246 : PVOID Pointer;
247 : };
248 :
249 : HANDLE hEvent;
250 : } OVERLAPPED, *LPOVERLAPPED;
251 :
252 : typedef struct _OVERLAPPED_ENTRY {
253 : ULONG_PTR lpCompletionKey;
254 : LPOVERLAPPED lpOverlapped;
255 : ULONG_PTR Internal;
256 : DWORD dwNumberOfBytesTransferred;
257 : } OVERLAPPED_ENTRY, *LPOVERLAPPED_ENTRY;
258 :
259 : typedef struct _SECURITY_ATTRIBUTES {
260 : DWORD nLength;
261 : LPVOID lpSecurityDescriptor;
262 : BOOL bInheritHandle;
263 : } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
264 :
265 : typedef struct _PROCESS_INFORMATION {
266 : HANDLE hProcess;
267 : HANDLE hThread;
268 : DWORD dwProcessId;
269 : DWORD dwThreadId;
270 : } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
271 :
272 : //
273 : // File System time stamps are represented with the following structure:
274 : //
275 :
276 :
277 : #ifndef _FILETIME_
278 : #define _FILETIME_
279 : typedef struct _FILETIME {
280 : DWORD dwLowDateTime;
281 : DWORD dwHighDateTime;
282 : } FILETIME, *PFILETIME, *LPFILETIME;
283 : #endif
284 :
285 : //
286 : // System time is represented with the following structure:
287 : //
288 :
289 :
290 : typedef struct _SYSTEMTIME {
291 : WORD wYear;
292 : WORD wMonth;
293 : WORD wDayOfWeek;
294 : WORD wDay;
295 : WORD wHour;
296 : WORD wMinute;
297 : WORD wSecond;
298 : WORD wMilliseconds;
299 : } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
300 :
301 :
302 : typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(
303 : LPVOID lpThreadParameter
304 : );
305 : typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
306 :
307 : #if(_WIN32_WINNT >= 0x0400)
308 : typedef VOID (WINAPI *PFIBER_START_ROUTINE)(
309 : LPVOID lpFiberParameter
310 : );
311 : typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
312 : #endif /* _WIN32_WINNT >= 0x0400 */
313 :
314 : typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
315 : typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;
316 : typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;
317 :
318 : typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG;
319 : typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG;
320 : typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG;
321 :
322 : #if (_WIN32_WINNT >= 0x0600)
323 :
324 : //
325 : // Define one-time initialization primitive
326 : //
327 :
328 : typedef RTL_RUN_ONCE INIT_ONCE;
329 : typedef PRTL_RUN_ONCE PINIT_ONCE;
330 : typedef PRTL_RUN_ONCE LPINIT_ONCE;
331 :
332 : #define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT
333 :
334 : //
335 : // Run once flags
336 : //
337 :
338 : #define INIT_ONCE_CHECK_ONLY RTL_RUN_ONCE_CHECK_ONLY
339 : #define INIT_ONCE_ASYNC RTL_RUN_ONCE_ASYNC
340 : #define INIT_ONCE_INIT_FAILED RTL_RUN_ONCE_INIT_FAILED
341 :
342 : //
343 : // The context stored in the run once structure must leave the following number
344 : // of low order bits unused.
345 : //
346 :
347 : #define INIT_ONCE_CTX_RESERVED_BITS RTL_RUN_ONCE_CTX_RESERVED_BITS
348 :
349 : typedef
350 : BOOL
351 : (WINAPI *PINIT_ONCE_FN) (
352 : __inout PINIT_ONCE InitOnce,
353 : __inout_opt PVOID Parameter,
354 : __deref_opt_out_opt PVOID *Context
355 : );
356 :
357 : WINBASEAPI
358 : VOID
359 : WINAPI
360 : InitOnceInitialize (
361 : __out PINIT_ONCE InitOnce
362 : );
363 :
364 : WINBASEAPI
365 : BOOL
366 : WINAPI
367 : InitOnceExecuteOnce (
368 : __inout PINIT_ONCE InitOnce,
369 : __in __callback PINIT_ONCE_FN InitFn,
370 : __inout_opt PVOID Parameter,
371 : __deref_opt_out_opt LPVOID *Context
372 : );
373 :
374 : WINBASEAPI
375 : BOOL
376 : WINAPI
377 : InitOnceBeginInitialize (
378 : __inout LPINIT_ONCE lpInitOnce,
379 : __in DWORD dwFlags,
380 : __out PBOOL fPending,
381 : __deref_opt_out_opt LPVOID *lpContext
382 : );
383 :
384 : WINBASEAPI
385 : BOOL
386 : WINAPI
387 : InitOnceComplete (
388 : __inout LPINIT_ONCE lpInitOnce,
389 : __in DWORD dwFlags,
390 : __in_opt LPVOID lpContext
391 : );
392 :
393 : #endif
394 :
395 : //
396 : // Define the slim r/w lock
397 : //
398 :
399 : typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
400 :
401 : #define SRWLOCK_INIT RTL_SRWLOCK_INIT
402 :
403 : WINBASEAPI
404 : VOID
405 : WINAPI
406 : InitializeSRWLock (
407 : __out PSRWLOCK SRWLock
408 : );
409 :
410 : WINBASEAPI
411 : VOID
412 : WINAPI
413 : ReleaseSRWLockExclusive (
414 : __inout PSRWLOCK SRWLock
415 : );
416 :
417 : WINBASEAPI
418 : VOID
419 : WINAPI
420 : ReleaseSRWLockShared (
421 : __inout PSRWLOCK SRWLock
422 : );
423 :
424 : WINBASEAPI
425 : VOID
426 : WINAPI
427 : AcquireSRWLockExclusive (
428 : __inout PSRWLOCK SRWLock
429 : );
430 :
431 : WINBASEAPI
432 : VOID
433 : WINAPI
434 : AcquireSRWLockShared (
435 : __inout PSRWLOCK SRWLock
436 : );
437 :
438 : //
439 : // Define condition variable
440 : //
441 :
442 : typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;
443 :
444 : WINBASEAPI
445 : VOID
446 : WINAPI
447 : InitializeConditionVariable (
448 : __out PCONDITION_VARIABLE ConditionVariable
449 : );
450 :
451 : WINBASEAPI
452 : VOID
453 : WINAPI
454 : WakeConditionVariable (
455 : __inout PCONDITION_VARIABLE ConditionVariable
456 : );
457 :
458 : WINBASEAPI
459 : VOID
460 : WINAPI
461 : WakeAllConditionVariable (
462 : __inout PCONDITION_VARIABLE ConditionVariable
463 : );
464 :
465 : WINBASEAPI
466 : BOOL
467 : WINAPI
468 : SleepConditionVariableCS (
469 : __inout PCONDITION_VARIABLE ConditionVariable,
470 : __inout PCRITICAL_SECTION CriticalSection,
471 : __in DWORD dwMilliseconds
472 : );
473 :
474 : WINBASEAPI
475 : BOOL
476 : WINAPI
477 : SleepConditionVariableSRW (
478 : __inout PCONDITION_VARIABLE ConditionVariable,
479 : __inout PSRWLOCK SRWLock,
480 : __in DWORD dwMilliseconds,
481 : __in ULONG Flags
482 : );
483 :
484 : //
485 : // Static initializer for the condition variable
486 : //
487 :
488 : #define CONDITION_VARIABLE_INIT RTL_CONDITION_VARIABLE_INIT
489 :
490 : //
491 : // Flags for condition variables
492 : //
493 : #define CONDITION_VARIABLE_LOCKMODE_SHARED RTL_CONDITION_VARIABLE_LOCKMODE_SHARED
494 :
495 :
496 : WINBASEAPI
497 : __out_opt
498 : PVOID
499 : WINAPI
500 : EncodePointer (
501 : __in_opt PVOID Ptr
502 : );
503 :
504 : WINBASEAPI
505 : __out_opt
506 : PVOID
507 : WINAPI
508 : DecodePointer (
509 : __in_opt PVOID Ptr
510 : );
511 :
512 : WINBASEAPI
513 : __out_opt
514 : PVOID
515 : WINAPI
516 : EncodeSystemPointer (
517 : __in_opt PVOID Ptr
518 : );
519 :
520 : WINBASEAPI
521 : __out_opt
522 : PVOID
523 : WINAPI
524 : DecodeSystemPointer (
525 : __in_opt PVOID Ptr
526 : );
527 :
528 : #if defined(_X86_)
529 : typedef PLDT_ENTRY LPLDT_ENTRY;
530 : #else
531 : typedef LPVOID LPLDT_ENTRY;
532 : #endif
533 :
534 : #define MUTEX_MODIFY_STATE MUTANT_QUERY_STATE
535 : #define MUTEX_ALL_ACCESS MUTANT_ALL_ACCESS
536 :
537 : //
538 : // Serial provider type.
539 : //
540 :
541 : #define SP_SERIALCOMM ((DWORD)0x00000001)
542 :
543 : //
544 : // Provider SubTypes
545 : //
546 :
547 : #define PST_UNSPECIFIED ((DWORD)0x00000000)
548 : #define PST_RS232 ((DWORD)0x00000001)
549 : #define PST_PARALLELPORT ((DWORD)0x00000002)
550 : #define PST_RS422 ((DWORD)0x00000003)
551 : #define PST_RS423 ((DWORD)0x00000004)
552 : #define PST_RS449 ((DWORD)0x00000005)
553 : #define PST_MODEM ((DWORD)0x00000006)
554 : #define PST_FAX ((DWORD)0x00000021)
555 : #define PST_SCANNER ((DWORD)0x00000022)
556 : #define PST_NETWORK_BRIDGE ((DWORD)0x00000100)
557 : #define PST_LAT ((DWORD)0x00000101)
558 : #define PST_TCPIP_TELNET ((DWORD)0x00000102)
559 : #define PST_X25 ((DWORD)0x00000103)
560 :
561 :
562 : //
563 : // Provider capabilities flags.
564 : //
565 :
566 : #define PCF_DTRDSR ((DWORD)0x0001)
567 : #define PCF_RTSCTS ((DWORD)0x0002)
568 : #define PCF_RLSD ((DWORD)0x0004)
569 : #define PCF_PARITY_CHECK ((DWORD)0x0008)
570 : #define PCF_XONXOFF ((DWORD)0x0010)
571 : #define PCF_SETXCHAR ((DWORD)0x0020)
572 : #define PCF_TOTALTIMEOUTS ((DWORD)0x0040)
573 : #define PCF_INTTIMEOUTS ((DWORD)0x0080)
574 : #define PCF_SPECIALCHARS ((DWORD)0x0100)
575 : #define PCF_16BITMODE ((DWORD)0x0200)
576 :
577 : //
578 : // Comm provider settable parameters.
579 : //
580 :
581 : #define SP_PARITY ((DWORD)0x0001)
582 : #define SP_BAUD ((DWORD)0x0002)
583 : #define SP_DATABITS ((DWORD)0x0004)
584 : #define SP_STOPBITS ((DWORD)0x0008)
585 : #define SP_HANDSHAKING ((DWORD)0x0010)
586 : #define SP_PARITY_CHECK ((DWORD)0x0020)
587 : #define SP_RLSD ((DWORD)0x0040)
588 :
589 : //
590 : // Settable baud rates in the provider.
591 : //
592 :
593 : #define BAUD_075 ((DWORD)0x00000001)
594 : #define BAUD_110 ((DWORD)0x00000002)
595 : #define BAUD_134_5 ((DWORD)0x00000004)
596 : #define BAUD_150 ((DWORD)0x00000008)
597 : #define BAUD_300 ((DWORD)0x00000010)
598 : #define BAUD_600 ((DWORD)0x00000020)
599 : #define BAUD_1200 ((DWORD)0x00000040)
600 : #define BAUD_1800 ((DWORD)0x00000080)
601 : #define BAUD_2400 ((DWORD)0x00000100)
602 : #define BAUD_4800 ((DWORD)0x00000200)
603 : #define BAUD_7200 ((DWORD)0x00000400)
604 : #define BAUD_9600 ((DWORD)0x00000800)
605 : #define BAUD_14400 ((DWORD)0x00001000)
606 : #define BAUD_19200 ((DWORD)0x00002000)
607 : #define BAUD_38400 ((DWORD)0x00004000)
608 : #define BAUD_56K ((DWORD)0x00008000)
609 : #define BAUD_128K ((DWORD)0x00010000)
610 : #define BAUD_115200 ((DWORD)0x00020000)
611 : #define BAUD_57600 ((DWORD)0x00040000)
612 : #define BAUD_USER ((DWORD)0x10000000)
613 :
614 : //
615 : // Settable Data Bits
616 : //
617 :
618 : #define DATABITS_5 ((WORD)0x0001)
619 : #define DATABITS_6 ((WORD)0x0002)
620 : #define DATABITS_7 ((WORD)0x0004)
621 : #define DATABITS_8 ((WORD)0x0008)
622 : #define DATABITS_16 ((WORD)0x0010)
623 : #define DATABITS_16X ((WORD)0x0020)
624 :
625 : //
626 : // Settable Stop and Parity bits.
627 : //
628 :
629 : #define STOPBITS_10 ((WORD)0x0001)
630 : #define STOPBITS_15 ((WORD)0x0002)
631 : #define STOPBITS_20 ((WORD)0x0004)
632 : #define PARITY_NONE ((WORD)0x0100)
633 : #define PARITY_ODD ((WORD)0x0200)
634 : #define PARITY_EVEN ((WORD)0x0400)
635 : #define PARITY_MARK ((WORD)0x0800)
636 : #define PARITY_SPACE ((WORD)0x1000)
637 :
638 : typedef struct _COMMPROP {
639 : WORD wPacketLength;
640 : WORD wPacketVersion;
641 : DWORD dwServiceMask;
642 : DWORD dwReserved1;
643 : DWORD dwMaxTxQueue;
644 : DWORD dwMaxRxQueue;
645 : DWORD dwMaxBaud;
646 : DWORD dwProvSubType;
647 : DWORD dwProvCapabilities;
648 : DWORD dwSettableParams;
649 : DWORD dwSettableBaud;
650 : WORD wSettableData;
651 : WORD wSettableStopParity;
652 : DWORD dwCurrentTxQueue;
653 : DWORD dwCurrentRxQueue;
654 : DWORD dwProvSpec1;
655 : DWORD dwProvSpec2;
656 : WCHAR wcProvChar[1];
657 : } COMMPROP,*LPCOMMPROP;
658 :
659 : //
660 : // Set dwProvSpec1 to COMMPROP_INITIALIZED to indicate that wPacketLength
661 : // is valid before a call to GetCommProperties().
662 : //
663 : #define COMMPROP_INITIALIZED ((DWORD)0xE73CF52E)
664 :
665 : typedef struct _COMSTAT {
666 : DWORD fCtsHold : 1;
667 : DWORD fDsrHold : 1;
668 : DWORD fRlsdHold : 1;
669 : DWORD fXoffHold : 1;
670 : DWORD fXoffSent : 1;
671 : DWORD fEof : 1;
672 : DWORD fTxim : 1;
673 : DWORD fReserved : 25;
674 : DWORD cbInQue;
675 : DWORD cbOutQue;
676 : } COMSTAT, *LPCOMSTAT;
677 :
678 : //
679 : // DTR Control Flow Values.
680 : //
681 : #define DTR_CONTROL_DISABLE 0x00
682 : #define DTR_CONTROL_ENABLE 0x01
683 : #define DTR_CONTROL_HANDSHAKE 0x02
684 :
685 : //
686 : // RTS Control Flow Values
687 : //
688 : #define RTS_CONTROL_DISABLE 0x00
689 : #define RTS_CONTROL_ENABLE 0x01
690 : #define RTS_CONTROL_HANDSHAKE 0x02
691 : #define RTS_CONTROL_TOGGLE 0x03
692 :
693 : typedef struct _DCB {
694 : DWORD DCBlength; /* sizeof(DCB) */
695 : DWORD BaudRate; /* Baudrate at which running */
696 : DWORD fBinary: 1; /* Binary Mode (skip EOF check) */
697 : DWORD fParity: 1; /* Enable parity checking */
698 : DWORD fOutxCtsFlow:1; /* CTS handshaking on output */
699 : DWORD fOutxDsrFlow:1; /* DSR handshaking on output */
700 : DWORD fDtrControl:2; /* DTR Flow control */
701 : DWORD fDsrSensitivity:1; /* DSR Sensitivity */
702 : DWORD fTXContinueOnXoff: 1; /* Continue TX when Xoff sent */
703 : DWORD fOutX: 1; /* Enable output X-ON/X-OFF */
704 : DWORD fInX: 1; /* Enable input X-ON/X-OFF */
705 : DWORD fErrorChar: 1; /* Enable Err Replacement */
706 : DWORD fNull: 1; /* Enable Null stripping */
707 : DWORD fRtsControl:2; /* Rts Flow control */
708 : DWORD fAbortOnError:1; /* Abort all reads and writes on Error */
709 : DWORD fDummy2:17; /* Reserved */
710 : WORD wReserved; /* Not currently used */
711 : WORD XonLim; /* Transmit X-ON threshold */
712 : WORD XoffLim; /* Transmit X-OFF threshold */
713 : BYTE ByteSize; /* Number of bits/byte, 4-8 */
714 : BYTE Parity; /* 0-4=None,Odd,Even,Mark,Space */
715 : BYTE StopBits; /* 0,1,2 = 1, 1.5, 2 */
716 : char XonChar; /* Tx and Rx X-ON character */
717 : char XoffChar; /* Tx and Rx X-OFF character */
718 : char ErrorChar; /* Error replacement char */
719 : char EofChar; /* End of Input character */
720 : char EvtChar; /* Received Event character */
721 : WORD wReserved1; /* Fill for now. */
722 : } DCB, *LPDCB;
723 :
724 : typedef struct _COMMTIMEOUTS {
725 : DWORD ReadIntervalTimeout; /* Maximum time between read chars. */
726 : DWORD ReadTotalTimeoutMultiplier; /* Multiplier of characters. */
727 : DWORD ReadTotalTimeoutConstant; /* Constant in milliseconds. */
728 : DWORD WriteTotalTimeoutMultiplier; /* Multiplier of characters. */
729 : DWORD WriteTotalTimeoutConstant; /* Constant in milliseconds. */
730 : } COMMTIMEOUTS,*LPCOMMTIMEOUTS;
731 :
732 : typedef struct _COMMCONFIG {
733 : DWORD dwSize; /* Size of the entire struct */
734 : WORD wVersion; /* version of the structure */
735 : WORD wReserved; /* alignment */
736 : DCB dcb; /* device control block */
737 : DWORD dwProviderSubType; /* ordinal value for identifying
738 : provider-defined data structure format*/
739 : DWORD dwProviderOffset; /* Specifies the offset of provider specific
740 : data field in bytes from the start */
741 : DWORD dwProviderSize; /* size of the provider-specific data field */
742 : WCHAR wcProviderData[1]; /* provider-specific data */
743 : } COMMCONFIG,*LPCOMMCONFIG;
744 :
745 : typedef struct _SYSTEM_INFO {
746 : union {
747 : DWORD dwOemId; // Obsolete field...do not use
748 : struct {
749 : WORD wProcessorArchitecture;
750 : WORD wReserved;
751 : };
752 : };
753 : DWORD dwPageSize;
754 : LPVOID lpMinimumApplicationAddress;
755 : LPVOID lpMaximumApplicationAddress;
756 : DWORD_PTR dwActiveProcessorMask;
757 : DWORD dwNumberOfProcessors;
758 : DWORD dwProcessorType;
759 : DWORD dwAllocationGranularity;
760 : WORD wProcessorLevel;
761 : WORD wProcessorRevision;
762 : } SYSTEM_INFO, *LPSYSTEM_INFO;
763 :
764 : //
765 : //
766 :
767 :
768 : #define FreeModule(hLibModule) FreeLibrary((hLibModule))
769 : #define MakeProcInstance(lpProc,hInstance) (lpProc)
770 : #define FreeProcInstance(lpProc) (lpProc)
771 :
772 : /* Global Memory Flags */
773 : #define GMEM_FIXED 0x0000
774 : #define GMEM_MOVEABLE 0x0002
775 : #define GMEM_NOCOMPACT 0x0010
776 : #define GMEM_NODISCARD 0x0020
777 : #define GMEM_ZEROINIT 0x0040
778 : #define GMEM_MODIFY 0x0080
779 : #define GMEM_DISCARDABLE 0x0100
780 : #define GMEM_NOT_BANKED 0x1000
781 : #define GMEM_SHARE 0x2000
782 : #define GMEM_DDESHARE 0x2000
783 : #define GMEM_NOTIFY 0x4000
784 : #define GMEM_LOWER GMEM_NOT_BANKED
785 : #define GMEM_VALID_FLAGS 0x7F72
786 : #define GMEM_INVALID_HANDLE 0x8000
787 :
788 : #define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT)
789 : #define GPTR (GMEM_FIXED | GMEM_ZEROINIT)
790 :
791 : #define GlobalLRUNewest( h ) ((HANDLE)(h))
792 : #define GlobalLRUOldest( h ) ((HANDLE)(h))
793 : #define GlobalDiscard( h ) GlobalReAlloc( (h), 0, GMEM_MOVEABLE )
794 :
795 : /* Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE) */
796 : #define GMEM_DISCARDED 0x4000
797 : #define GMEM_LOCKCOUNT 0x00FF
798 :
799 : typedef struct _MEMORYSTATUS {
800 : DWORD dwLength;
801 : DWORD dwMemoryLoad;
802 : SIZE_T dwTotalPhys;
803 : SIZE_T dwAvailPhys;
804 : SIZE_T dwTotalPageFile;
805 : SIZE_T dwAvailPageFile;
806 : SIZE_T dwTotalVirtual;
807 : SIZE_T dwAvailVirtual;
808 : } MEMORYSTATUS, *LPMEMORYSTATUS;
809 :
810 : /* Local Memory Flags */
811 : #define LMEM_FIXED 0x0000
812 : #define LMEM_MOVEABLE 0x0002
813 : #define LMEM_NOCOMPACT 0x0010
814 : #define LMEM_NODISCARD 0x0020
815 : #define LMEM_ZEROINIT 0x0040
816 : #define LMEM_MODIFY 0x0080
817 : #define LMEM_DISCARDABLE 0x0F00
818 : #define LMEM_VALID_FLAGS 0x0F72
819 : #define LMEM_INVALID_HANDLE 0x8000
820 :
821 : #define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
822 : #define LPTR (LMEM_FIXED | LMEM_ZEROINIT)
823 :
824 : #define NONZEROLHND (LMEM_MOVEABLE)
825 : #define NONZEROLPTR (LMEM_FIXED)
826 :
827 : #define LocalDiscard( h ) LocalReAlloc( (h), 0, LMEM_MOVEABLE )
828 :
829 : /* Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) */
830 : #define LMEM_DISCARDED 0x4000
831 : #define LMEM_LOCKCOUNT 0x00FF
832 :
833 : //
834 : // NUMA values
835 : //
836 : #define NUMA_NO_PREFERRED_NODE ((DWORD) -1)
837 :
838 : //
839 : // dwCreationFlag values
840 : //
841 :
842 : #define DEBUG_PROCESS 0x00000001
843 : #define DEBUG_ONLY_THIS_PROCESS 0x00000002
844 :
845 : #define CREATE_SUSPENDED 0x00000004
846 :
847 : #define DETACHED_PROCESS 0x00000008
848 :
849 : #define CREATE_NEW_CONSOLE 0x00000010
850 :
851 : #define NORMAL_PRIORITY_CLASS 0x00000020
852 : #define IDLE_PRIORITY_CLASS 0x00000040
853 : #define HIGH_PRIORITY_CLASS 0x00000080
854 : #define REALTIME_PRIORITY_CLASS 0x00000100
855 :
856 : #define CREATE_NEW_PROCESS_GROUP 0x00000200
857 : #define CREATE_UNICODE_ENVIRONMENT 0x00000400
858 :
859 : #define CREATE_SEPARATE_WOW_VDM 0x00000800
860 : #define CREATE_SHARED_WOW_VDM 0x00001000
861 : #define CREATE_FORCEDOS 0x00002000
862 :
863 : #define BELOW_NORMAL_PRIORITY_CLASS 0x00004000
864 : #define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
865 :
866 : #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
867 : #define INHERIT_CALLER_PRIORITY 0x00020000
868 :
869 : #define CREATE_PROTECTED_PROCESS 0x00040000
870 :
871 : #define EXTENDED_STARTUPINFO_PRESENT 0x00080000
872 :
873 : #define PROCESS_MODE_BACKGROUND_BEGIN 0x00100000
874 : #define PROCESS_MODE_BACKGROUND_END 0x00200000
875 :
876 : #define CREATE_BREAKAWAY_FROM_JOB 0x01000000
877 : #define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x02000000
878 :
879 : #define CREATE_DEFAULT_ERROR_MODE 0x04000000
880 :
881 : #define CREATE_NO_WINDOW 0x08000000
882 :
883 : #define PROFILE_USER 0x10000000
884 : #define PROFILE_KERNEL 0x20000000
885 : #define PROFILE_SERVER 0x40000000
886 :
887 : #define CREATE_IGNORE_SYSTEM_DEFAULT 0x80000000
888 :
889 : #define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
890 : #define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
891 : #define THREAD_PRIORITY_NORMAL 0
892 : #define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
893 : #define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)
894 : #define THREAD_PRIORITY_ERROR_RETURN (MAXLONG)
895 :
896 : #define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT
897 : #define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
898 :
899 : #define THREAD_MODE_BACKGROUND_BEGIN 0x00010000
900 : #define THREAD_MODE_BACKGROUND_END 0x00020000
901 :
902 : //
903 : // GetFinalPathNameByHandle
904 : //
905 :
906 : #define VOLUME_NAME_DOS 0x0 //default
907 : #define VOLUME_NAME_GUID 0x1
908 : #define VOLUME_NAME_NT 0x2
909 : #define VOLUME_NAME_NONE 0x4
910 :
911 : #define FILE_NAME_NORMALIZED 0x0 //default
912 : #define FILE_NAME_OPENED 0x8
913 :
914 : //
915 : // Debug APIs
916 : //
917 : #define EXCEPTION_DEBUG_EVENT 1
918 : #define CREATE_THREAD_DEBUG_EVENT 2
919 : #define CREATE_PROCESS_DEBUG_EVENT 3
920 : #define EXIT_THREAD_DEBUG_EVENT 4
921 : #define EXIT_PROCESS_DEBUG_EVENT 5
922 : #define LOAD_DLL_DEBUG_EVENT 6
923 : #define UNLOAD_DLL_DEBUG_EVENT 7
924 : #define OUTPUT_DEBUG_STRING_EVENT 8
925 : #define RIP_EVENT 9
926 :
927 : typedef struct _EXCEPTION_DEBUG_INFO {
928 : EXCEPTION_RECORD ExceptionRecord;
929 : DWORD dwFirstChance;
930 : } EXCEPTION_DEBUG_INFO, *LPEXCEPTION_DEBUG_INFO;
931 :
932 : typedef struct _CREATE_THREAD_DEBUG_INFO {
933 : HANDLE hThread;
934 : LPVOID lpThreadLocalBase;
935 : LPTHREAD_START_ROUTINE lpStartAddress;
936 : } CREATE_THREAD_DEBUG_INFO, *LPCREATE_THREAD_DEBUG_INFO;
937 :
938 : typedef struct _CREATE_PROCESS_DEBUG_INFO {
939 : HANDLE hFile;
940 : HANDLE hProcess;
941 : HANDLE hThread;
942 : LPVOID lpBaseOfImage;
943 : DWORD dwDebugInfoFileOffset;
944 : DWORD nDebugInfoSize;
945 : LPVOID lpThreadLocalBase;
946 : LPTHREAD_START_ROUTINE lpStartAddress;
947 : LPVOID lpImageName;
948 : WORD fUnicode;
949 : } CREATE_PROCESS_DEBUG_INFO, *LPCREATE_PROCESS_DEBUG_INFO;
950 :
951 : typedef struct _EXIT_THREAD_DEBUG_INFO {
952 : DWORD dwExitCode;
953 : } EXIT_THREAD_DEBUG_INFO, *LPEXIT_THREAD_DEBUG_INFO;
954 :
955 : typedef struct _EXIT_PROCESS_DEBUG_INFO {
956 : DWORD dwExitCode;
957 : } EXIT_PROCESS_DEBUG_INFO, *LPEXIT_PROCESS_DEBUG_INFO;
958 :
959 : typedef struct _LOAD_DLL_DEBUG_INFO {
960 : HANDLE hFile;
961 : LPVOID lpBaseOfDll;
962 : DWORD dwDebugInfoFileOffset;
963 : DWORD nDebugInfoSize;
964 : LPVOID lpImageName;
965 : WORD fUnicode;
966 : } LOAD_DLL_DEBUG_INFO, *LPLOAD_DLL_DEBUG_INFO;
967 :
968 : typedef struct _UNLOAD_DLL_DEBUG_INFO {
969 : LPVOID lpBaseOfDll;
970 : } UNLOAD_DLL_DEBUG_INFO, *LPUNLOAD_DLL_DEBUG_INFO;
971 :
972 : typedef struct _OUTPUT_DEBUG_STRING_INFO {
973 : LPSTR lpDebugStringData;
974 : WORD fUnicode;
975 : WORD nDebugStringLength;
976 : } OUTPUT_DEBUG_STRING_INFO, *LPOUTPUT_DEBUG_STRING_INFO;
977 :
978 : typedef struct _RIP_INFO {
979 : DWORD dwError;
980 : DWORD dwType;
981 : } RIP_INFO, *LPRIP_INFO;
982 :
983 :
984 : typedef struct _DEBUG_EVENT {
985 : DWORD dwDebugEventCode;
986 : DWORD dwProcessId;
987 : DWORD dwThreadId;
988 : union {
989 : EXCEPTION_DEBUG_INFO Exception;
990 : CREATE_THREAD_DEBUG_INFO CreateThread;
991 : CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
992 : EXIT_THREAD_DEBUG_INFO ExitThread;
993 : EXIT_PROCESS_DEBUG_INFO ExitProcess;
994 : LOAD_DLL_DEBUG_INFO LoadDll;
995 : UNLOAD_DLL_DEBUG_INFO UnloadDll;
996 : OUTPUT_DEBUG_STRING_INFO DebugString;
997 : RIP_INFO RipInfo;
998 : } u;
999 : } DEBUG_EVENT, *LPDEBUG_EVENT;
1000 :
1001 : //
1002 : // JIT Debugging Info. This structure is defined to have constant size in
1003 : // both the emulated and native environment.
1004 : //
1005 :
1006 : typedef struct _JIT_DEBUG_INFO {
1007 : DWORD dwSize;
1008 : DWORD dwProcessorArchitecture;
1009 : DWORD dwThreadID;
1010 : DWORD dwReserved0;
1011 : ULONG64 lpExceptionAddress;
1012 : ULONG64 lpExceptionRecord;
1013 : ULONG64 lpContextRecord;
1014 : } JIT_DEBUG_INFO, *LPJIT_DEBUG_INFO;
1015 :
1016 : typedef JIT_DEBUG_INFO JIT_DEBUG_INFO32, *LPJIT_DEBUG_INFO32;
1017 : typedef JIT_DEBUG_INFO JIT_DEBUG_INFO64, *LPJIT_DEBUG_INFO64;
1018 :
1019 : #if !defined(MIDL_PASS)
1020 : typedef PCONTEXT LPCONTEXT;
1021 : typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
1022 : typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;
1023 : #endif
1024 :
1025 : #define DRIVE_UNKNOWN 0
1026 : #define DRIVE_NO_ROOT_DIR 1
1027 : #define DRIVE_REMOVABLE 2
1028 : #define DRIVE_FIXED 3
1029 : #define DRIVE_REMOTE 4
1030 : #define DRIVE_CDROM 5
1031 : #define DRIVE_RAMDISK 6
1032 :
1033 :
1034 : #ifndef _MAC
1035 : #define GetFreeSpace(w) (0x100000L)
1036 : #else
1037 : WINBASEAPI DWORD WINAPI GetFreeSpace(__in UINT);
1038 : #endif
1039 :
1040 :
1041 : #define FILE_TYPE_UNKNOWN 0x0000
1042 : #define FILE_TYPE_DISK 0x0001
1043 : #define FILE_TYPE_CHAR 0x0002
1044 : #define FILE_TYPE_PIPE 0x0003
1045 : #define FILE_TYPE_REMOTE 0x8000
1046 :
1047 :
1048 : #define STD_INPUT_HANDLE ((DWORD)-10)
1049 : #define STD_OUTPUT_HANDLE ((DWORD)-11)
1050 : #define STD_ERROR_HANDLE ((DWORD)-12)
1051 :
1052 : #define NOPARITY 0
1053 : #define ODDPARITY 1
1054 : #define EVENPARITY 2
1055 : #define MARKPARITY 3
1056 : #define SPACEPARITY 4
1057 :
1058 : #define ONESTOPBIT 0
1059 : #define ONE5STOPBITS 1
1060 : #define TWOSTOPBITS 2
1061 :
1062 : #define IGNORE 0 // Ignore signal
1063 : #define INFINITE 0xFFFFFFFF // Infinite timeout
1064 :
1065 : //
1066 : // Baud rates at which the communication device operates
1067 : //
1068 :
1069 : #define CBR_110 110
1070 : #define CBR_300 300
1071 : #define CBR_600 600
1072 : #define CBR_1200 1200
1073 : #define CBR_2400 2400
1074 : #define CBR_4800 4800
1075 : #define CBR_9600 9600
1076 : #define CBR_14400 14400
1077 : #define CBR_19200 19200
1078 : #define CBR_38400 38400
1079 : #define CBR_56000 56000
1080 : #define CBR_57600 57600
1081 : #define CBR_115200 115200
1082 : #define CBR_128000 128000
1083 : #define CBR_256000 256000
1084 :
1085 : //
1086 : // Error Flags
1087 : //
1088 :
1089 : #define CE_RXOVER 0x0001 // Receive Queue overflow
1090 : #define CE_OVERRUN 0x0002 // Receive Overrun Error
1091 : #define CE_RXPARITY 0x0004 // Receive Parity Error
1092 : #define CE_FRAME 0x0008 // Receive Framing error
1093 : #define CE_BREAK 0x0010 // Break Detected
1094 : #define CE_TXFULL 0x0100 // TX Queue is full
1095 : #define CE_PTO 0x0200 // LPTx Timeout
1096 : #define CE_IOE 0x0400 // LPTx I/O Error
1097 : #define CE_DNS 0x0800 // LPTx Device not selected
1098 : #define CE_OOP 0x1000 // LPTx Out-Of-Paper
1099 : #define CE_MODE 0x8000 // Requested mode unsupported
1100 :
1101 : #define IE_BADID (-1) // Invalid or unsupported id
1102 : #define IE_OPEN (-2) // Device Already Open
1103 : #define IE_NOPEN (-3) // Device Not Open
1104 : #define IE_MEMORY (-4) // Unable to allocate queues
1105 : #define IE_DEFAULT (-5) // Error in default parameters
1106 : #define IE_HARDWARE (-10) // Hardware Not Present
1107 : #define IE_BYTESIZE (-11) // Illegal Byte Size
1108 : #define IE_BAUDRATE (-12) // Unsupported BaudRate
1109 :
1110 : //
1111 : // Events
1112 : //
1113 :
1114 : #define EV_RXCHAR 0x0001 // Any Character received
1115 : #define EV_RXFLAG 0x0002 // Received certain character
1116 : #define EV_TXEMPTY 0x0004 // Transmitt Queue Empty
1117 : #define EV_CTS 0x0008 // CTS changed state
1118 : #define EV_DSR 0x0010 // DSR changed state
1119 : #define EV_RLSD 0x0020 // RLSD changed state
1120 : #define EV_BREAK 0x0040 // BREAK received
1121 : #define EV_ERR 0x0080 // Line status error occurred
1122 : #define EV_RING 0x0100 // Ring signal detected
1123 : #define EV_PERR 0x0200 // Printer error occured
1124 : #define EV_RX80FULL 0x0400 // Receive buffer is 80 percent full
1125 : #define EV_EVENT1 0x0800 // Provider specific event 1
1126 : #define EV_EVENT2 0x1000 // Provider specific event 2
1127 :
1128 : //
1129 : // Escape Functions
1130 : //
1131 :
1132 : #define SETXOFF 1 // Simulate XOFF received
1133 : #define SETXON 2 // Simulate XON received
1134 : #define SETRTS 3 // Set RTS high
1135 : #define CLRRTS 4 // Set RTS low
1136 : #define SETDTR 5 // Set DTR high
1137 : #define CLRDTR 6 // Set DTR low
1138 : #define RESETDEV 7 // Reset device if possible
1139 : #define SETBREAK 8 // Set the device break line.
1140 : #define CLRBREAK 9 // Clear the device break line.
1141 :
1142 : //
1143 : // PURGE function flags.
1144 : //
1145 : #define PURGE_TXABORT 0x0001 // Kill the pending/current writes to the comm port.
1146 : #define PURGE_RXABORT 0x0002 // Kill the pending/current reads to the comm port.
1147 : #define PURGE_TXCLEAR 0x0004 // Kill the transmit queue if there.
1148 : #define PURGE_RXCLEAR 0x0008 // Kill the typeahead buffer if there.
1149 :
1150 : #define LPTx 0x80 // Set if ID is for LPT device
1151 :
1152 : //
1153 : // Modem Status Flags
1154 : //
1155 : #define MS_CTS_ON ((DWORD)0x0010)
1156 : #define MS_DSR_ON ((DWORD)0x0020)
1157 : #define MS_RING_ON ((DWORD)0x0040)
1158 : #define MS_RLSD_ON ((DWORD)0x0080)
1159 :
1160 : //
1161 : // WaitSoundState() Constants
1162 : //
1163 :
1164 : #define S_QUEUEEMPTY 0
1165 : #define S_THRESHOLD 1
1166 : #define S_ALLTHRESHOLD 2
1167 :
1168 : //
1169 : // Accent Modes
1170 : //
1171 :
1172 : #define S_NORMAL 0
1173 : #define S_LEGATO 1
1174 : #define S_STACCATO 2
1175 :
1176 : //
1177 : // SetSoundNoise() Sources
1178 : //
1179 :
1180 : #define S_PERIOD512 0 // Freq = N/512 high pitch, less coarse hiss
1181 : #define S_PERIOD1024 1 // Freq = N/1024
1182 : #define S_PERIOD2048 2 // Freq = N/2048 low pitch, more coarse hiss
1183 : #define S_PERIODVOICE 3 // Source is frequency from voice channel (3)
1184 : #define S_WHITE512 4 // Freq = N/512 high pitch, less coarse hiss
1185 : #define S_WHITE1024 5 // Freq = N/1024
1186 : #define S_WHITE2048 6 // Freq = N/2048 low pitch, more coarse hiss
1187 : #define S_WHITEVOICE 7 // Source is frequency from voice channel (3)
1188 :
1189 : #define S_SERDVNA (-1) // Device not available
1190 : #define S_SEROFM (-2) // Out of memory
1191 : #define S_SERMACT (-3) // Music active
1192 : #define S_SERQFUL (-4) // Queue full
1193 : #define S_SERBDNT (-5) // Invalid note
1194 : #define S_SERDLN (-6) // Invalid note length
1195 : #define S_SERDCC (-7) // Invalid note count
1196 : #define S_SERDTP (-8) // Invalid tempo
1197 : #define S_SERDVL (-9) // Invalid volume
1198 : #define S_SERDMD (-10) // Invalid mode
1199 : #define S_SERDSH (-11) // Invalid shape
1200 : #define S_SERDPT (-12) // Invalid pitch
1201 : #define S_SERDFQ (-13) // Invalid frequency
1202 : #define S_SERDDR (-14) // Invalid duration
1203 : #define S_SERDSR (-15) // Invalid source
1204 : #define S_SERDST (-16) // Invalid state
1205 :
1206 : #define NMPWAIT_WAIT_FOREVER 0xffffffff
1207 : #define NMPWAIT_NOWAIT 0x00000001
1208 : #define NMPWAIT_USE_DEFAULT_WAIT 0x00000000
1209 :
1210 : #define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
1211 : #define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
1212 : #define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
1213 : #define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS
1214 : #define FS_VOL_IS_COMPRESSED FILE_VOLUME_IS_COMPRESSED
1215 : #define FS_FILE_COMPRESSION FILE_FILE_COMPRESSION
1216 : #define FS_FILE_ENCRYPTION FILE_SUPPORTS_ENCRYPTION
1217 :
1218 : #define FILE_MAP_COPY SECTION_QUERY
1219 : #define FILE_MAP_WRITE SECTION_MAP_WRITE
1220 : #define FILE_MAP_READ SECTION_MAP_READ
1221 : #define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS
1222 : #define FILE_MAP_EXECUTE SECTION_MAP_EXECUTE_EXPLICIT // not included in FILE_MAP_ALL_ACCESS
1223 :
1224 : #define OF_READ 0x00000000
1225 : #define OF_WRITE 0x00000001
1226 : #define OF_READWRITE 0x00000002
1227 : #define OF_SHARE_COMPAT 0x00000000
1228 : #define OF_SHARE_EXCLUSIVE 0x00000010
1229 : #define OF_SHARE_DENY_WRITE 0x00000020
1230 : #define OF_SHARE_DENY_READ 0x00000030
1231 : #define OF_SHARE_DENY_NONE 0x00000040
1232 : #define OF_PARSE 0x00000100
1233 : #define OF_DELETE 0x00000200
1234 : #define OF_VERIFY 0x00000400
1235 : #define OF_CANCEL 0x00000800
1236 : #define OF_CREATE 0x00001000
1237 : #define OF_PROMPT 0x00002000
1238 : #define OF_EXIST 0x00004000
1239 : #define OF_REOPEN 0x00008000
1240 :
1241 : #define OFS_MAXPATHNAME 128
1242 : typedef struct _OFSTRUCT {
1243 : BYTE cBytes;
1244 : BYTE fFixedDisk;
1245 : WORD nErrCode;
1246 : WORD Reserved1;
1247 : WORD Reserved2;
1248 : CHAR szPathName[OFS_MAXPATHNAME];
1249 : } OFSTRUCT, *LPOFSTRUCT, *POFSTRUCT;
1250 :
1251 : #ifndef NOWINBASEINTERLOCK
1252 :
1253 : #ifndef _NTOS_
1254 :
1255 : #if defined(_M_IA64) && !defined(RC_INVOKED)
1256 :
1257 : #define InterlockedIncrement _InterlockedIncrement
1258 : #define InterlockedIncrementAcquire _InterlockedIncrement_acq
1259 : #define InterlockedIncrementRelease _InterlockedIncrement_rel
1260 : #define InterlockedDecrement _InterlockedDecrement
1261 : #define InterlockedDecrementAcquire _InterlockedDecrement_acq
1262 : #define InterlockedDecrementRelease _InterlockedDecrement_rel
1263 : #define InterlockedExchange _InterlockedExchange
1264 : #define InterlockedExchangeAdd _InterlockedExchangeAdd
1265 : #define InterlockedCompareExchange _InterlockedCompareExchange
1266 : #define InterlockedCompareExchangeAcquire _InterlockedCompareExchange_acq
1267 : #define InterlockedCompareExchangeRelease _InterlockedCompareExchange_rel
1268 : #define InterlockedExchangePointer _InterlockedExchangePointer
1269 : #define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
1270 : #define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer_rel
1271 : #define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer_acq
1272 :
1273 : #define InterlockedIncrement64 _InterlockedIncrement64
1274 : #define InterlockedDecrement64 _InterlockedDecrement64
1275 : #define InterlockedExchange64 _InterlockedExchange64
1276 : #define InterlockedExchangeAcquire64 _InterlockedExchange64_acq
1277 : #define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
1278 : #define InterlockedCompareExchange64 _InterlockedCompareExchange64
1279 : #define InterlockedCompareExchangeAcquire64 _InterlockedCompareExchange64_acq
1280 : #define InterlockedCompareExchangeRelease64 _InterlockedCompareExchange64_rel
1281 : #define InterlockedCompare64Exchange128 _InterlockedCompare64Exchange128
1282 : #define InterlockedCompare64ExchangeAcquire128 _InterlockedCompare64Exchange128_acq
1283 : #define InterlockedCompare64ExchangeRelease128 _InterlockedCompare64Exchange128_rel
1284 :
1285 : #define InterlockedOr _InterlockedOr
1286 : #define InterlockedOrAcquire _InterlockedOr_acq
1287 : #define InterlockedOrRelease _InterlockedOr_rel
1288 : #define InterlockedOr8 _InterlockedOr8
1289 : #define InterlockedOr8Acquire _InterlockedOr8_acq
1290 : #define InterlockedOr8Release _InterlockedOr8_rel
1291 : #define InterlockedOr16 _InterlockedOr16
1292 : #define InterlockedOr16Acquire _InterlockedOr16_acq
1293 : #define InterlockedOr16Release _InterlockedOr16_rel
1294 : #define InterlockedOr64 _InterlockedOr64
1295 : #define InterlockedOr64Acquire _InterlockedOr64_acq
1296 : #define InterlockedOr64Release _InterlockedOr64_rel
1297 : #define InterlockedXor _InterlockedXor
1298 : #define InterlockedXorAcquire _InterlockedXor_acq
1299 : #define InterlockedXorRelease _InterlockedXor_rel
1300 : #define InterlockedXor8 _InterlockedXor8
1301 : #define InterlockedXor8Acquire _InterlockedXor8_acq
1302 : #define InterlockedXor8Release _InterlockedXor8_rel
1303 : #define InterlockedXor16 _InterlockedXor16
1304 : #define InterlockedXor16Acquire _InterlockedXor16_acq
1305 : #define InterlockedXor16Release _InterlockedXor16_rel
1306 : #define InterlockedXor64 _InterlockedXor64
1307 : #define InterlockedXor64Acquire _InterlockedXor64_acq
1308 : #define InterlockedXor64Release _InterlockedXor64_rel
1309 : #define InterlockedAnd _InterlockedAnd
1310 : #define InterlockedAndAcquire _InterlockedAnd_acq
1311 : #define InterlockedAndRelease _InterlockedAnd_rel
1312 : #define InterlockedAnd8 _InterlockedAnd8
1313 : #define InterlockedAnd8Acquire _InterlockedAnd8_acq
1314 : #define InterlockedAnd8Release _InterlockedAnd8_rel
1315 : #define InterlockedAnd16 _InterlockedAnd16
1316 : #define InterlockedAnd16Acquire _InterlockedAnd16_acq
1317 : #define InterlockedAnd16Release _InterlockedAnd16_rel
1318 : #define InterlockedAnd64 _InterlockedAnd64
1319 : #define InterlockedAnd64Acquire _InterlockedAnd64_acq
1320 : #define InterlockedAnd64Release _InterlockedAnd64_rel
1321 :
1322 : LONG
1323 : __cdecl
1324 : InterlockedOr (
1325 : __inout LONG volatile *Destination,
1326 : __in LONG Value
1327 : );
1328 :
1329 : LONG
1330 : __cdecl
1331 : InterlockedOrAcquire (
1332 : __inout LONG volatile *Destination,
1333 : __in LONG Value
1334 : );
1335 :
1336 : LONG
1337 : __cdecl
1338 : InterlockedOrRelease (
1339 : __inout LONG volatile *Destination,
1340 : __in LONG Value
1341 : );
1342 :
1343 : char
1344 : __cdecl
1345 : InterlockedOr8 (
1346 : __inout char volatile *Destination,
1347 : __in char Value
1348 : );
1349 :
1350 : char
1351 : __cdecl
1352 : InterlockedOr8Acquire (
1353 : __inout char volatile *Destination,
1354 : __in char Value
1355 : );
1356 :
1357 : char
1358 : __cdecl
1359 : InterlockedOr8Release (
1360 : __inout char volatile *Destination,
1361 : __in char Value
1362 : );
1363 :
1364 : SHORT
1365 : __cdecl
1366 : InterlockedOr16(
1367 : __inout SHORT volatile *Destination,
1368 : __in SHORT Value
1369 : );
1370 :
1371 : SHORT
1372 : __cdecl
1373 : InterlockedOr16Acquire (
1374 : __inout SHORT volatile *Destination,
1375 : __in SHORT Value
1376 : );
1377 :
1378 : SHORT
1379 : __cdecl
1380 : InterlockedOr16Release (
1381 : __inout SHORT volatile *Destination,
1382 : __in SHORT Value
1383 : );
1384 :
1385 : LONGLONG
1386 : __cdecl
1387 : InterlockedOr64 (
1388 : __inout LONGLONG volatile *Destination,
1389 : __in LONGLONG Value
1390 : );
1391 :
1392 : LONGLONG
1393 : __cdecl
1394 : InterlockedOr64Acquire (
1395 : __inout LONGLONG volatile *Destination,
1396 : __in LONGLONG Value
1397 : );
1398 :
1399 : LONGLONG
1400 : __cdecl
1401 : InterlockedOr64Release (
1402 : __inout LONGLONG volatile *Destination,
1403 : __in LONGLONG Value
1404 : );
1405 :
1406 : LONG
1407 : __cdecl
1408 : InterlockedXor (
1409 : __inout LONG volatile *Destination,
1410 : __in LONG Value
1411 : );
1412 :
1413 : LONG
1414 : __cdecl
1415 : InterlockedXorAcquire (
1416 : __inout LONG volatile *Destination,
1417 : __in LONG Value
1418 : );
1419 :
1420 : LONG
1421 : __cdecl
1422 : InterlockedXorRelease (
1423 : __inout LONG volatile *Destination,
1424 : __in LONG Value
1425 : );
1426 :
1427 : char
1428 : __cdecl
1429 : InterlockedXor8 (
1430 : __inout char volatile *Destination,
1431 : __in char Value
1432 : );
1433 :
1434 : char
1435 : __cdecl
1436 : InterlockedXor8Acquire (
1437 : __inout char volatile *Destination,
1438 : __in char Value
1439 : );
1440 :
1441 : char
1442 : __cdecl
1443 : InterlockedXor8Release (
1444 : __inout char volatile *Destination,
1445 : __in char Value
1446 : );
1447 :
1448 : SHORT
1449 : __cdecl
1450 : InterlockedXor16(
1451 : __inout SHORT volatile *Destination,
1452 : __in SHORT Value
1453 : );
1454 :
1455 : SHORT
1456 : __cdecl
1457 : InterlockedXor16Acquire (
1458 : __inout SHORT volatile *Destination,
1459 : __in SHORT Value
1460 : );
1461 :
1462 : SHORT
1463 : __cdecl
1464 : InterlockedXor16Release (
1465 : __inout SHORT volatile *Destination,
1466 : __in SHORT Value
1467 : );
1468 :
1469 : LONGLONG
1470 : __cdecl
1471 : InterlockedXor64 (
1472 : __inout LONGLONG volatile *Destination,
1473 : __in LONGLONG Value
1474 : );
1475 :
1476 : LONGLONG
1477 : __cdecl
1478 : InterlockedXor64Acquire (
1479 : __inout LONGLONG volatile *Destination,
1480 : __in LONGLONG Value
1481 : );
1482 :
1483 : LONGLONG
1484 : __cdecl
1485 : InterlockedXor64Release (
1486 : __inout LONGLONG volatile *Destination,
1487 : __in LONGLONG Value
1488 : );
1489 :
1490 : LONG
1491 : __cdecl
1492 : InterlockedAnd (
1493 : __inout LONG volatile *Destination,
1494 : __in LONG Value
1495 : );
1496 :
1497 : LONG
1498 : __cdecl
1499 : InterlockedAndAcquire (
1500 : __inout LONG volatile *Destination,
1501 : __in LONG Value
1502 : );
1503 :
1504 : LONG
1505 : __cdecl
1506 : InterlockedAndRelease (
1507 : __inout LONG volatile *Destination,
1508 : __in LONG Value
1509 : );
1510 :
1511 : char
1512 : __cdecl
1513 : InterlockedAnd8 (
1514 : __inout char volatile *Destination,
1515 : __in char Value
1516 : );
1517 :
1518 : char
1519 : __cdecl
1520 : InterlockedAnd8Acquire (
1521 : __inout char volatile *Destination,
1522 : __in char Value
1523 : );
1524 :
1525 : char
1526 : __cdecl
1527 : InterlockedAnd8Release (
1528 : __inout char volatile *Destination,
1529 : __in char Value
1530 : );
1531 :
1532 : SHORT
1533 : __cdecl
1534 : InterlockedAnd16(
1535 : __inout SHORT volatile *Destination,
1536 : __in SHORT Value
1537 : );
1538 :
1539 : SHORT
1540 : __cdecl
1541 : InterlockedAnd16Acquire (
1542 : __inout SHORT volatile *Destination,
1543 : __in SHORT Value
1544 : );
1545 :
1546 : SHORT
1547 : __cdecl
1548 : InterlockedAnd16Release (
1549 : __inout SHORT volatile *Destination,
1550 : __in SHORT Value
1551 : );
1552 :
1553 : LONGLONG
1554 : __cdecl
1555 : InterlockedAnd64 (
1556 : __inout LONGLONG volatile *Destination,
1557 : __in LONGLONG Value
1558 : );
1559 :
1560 : LONGLONG
1561 : __cdecl
1562 : InterlockedAnd64Acquire (
1563 : __inout LONGLONG volatile *Destination,
1564 : __in LONGLONG Value
1565 : );
1566 :
1567 : LONGLONG
1568 : __cdecl
1569 : InterlockedAnd64Release (
1570 : __inout LONGLONG volatile *Destination,
1571 : __in LONGLONG Value
1572 : );
1573 :
1574 : LONGLONG
1575 : __cdecl
1576 : InterlockedIncrement64 (
1577 : __inout LONGLONG volatile *Addend
1578 : );
1579 :
1580 : LONGLONG
1581 : __cdecl
1582 : InterlockedDecrement64 (
1583 : __inout LONGLONG volatile *Addend
1584 : );
1585 :
1586 : LONG
1587 : __cdecl
1588 : InterlockedIncrementAcquire (
1589 : __inout LONG volatile *Addend
1590 : );
1591 :
1592 : LONG
1593 : __cdecl
1594 : InterlockedDecrementAcquire (
1595 : __inout LONG volatile *Addend
1596 : );
1597 :
1598 : LONG
1599 : __cdecl
1600 : InterlockedIncrementRelease (
1601 : __inout LONG volatile *Addend
1602 : );
1603 :
1604 : LONG
1605 : __cdecl
1606 : InterlockedDecrementRelease (
1607 : __inout LONG volatile *Addend
1608 : );
1609 :
1610 : LONGLONG
1611 : __cdecl
1612 : InterlockedExchange64 (
1613 : __inout LONGLONG volatile *Target,
1614 : __in LONGLONG Value
1615 : );
1616 :
1617 : LONGLONG
1618 : __cdecl
1619 : InterlockedExchangeAcquire64 (
1620 : __inout LONGLONG volatile *Target,
1621 : __in LONGLONG Value
1622 : );
1623 :
1624 : LONGLONG
1625 : __cdecl
1626 : InterlockedExchangeAdd64 (
1627 : __inout LONGLONG volatile *Addend,
1628 : __in LONGLONG Value
1629 : );
1630 :
1631 : LONGLONG
1632 : __cdecl
1633 : InterlockedCompareExchange64 (
1634 : __inout LONGLONG volatile *Destination,
1635 : __in LONGLONG ExChange,
1636 : __in LONGLONG Comperand
1637 : );
1638 :
1639 : LONGLONG
1640 : __cdecl
1641 : InterlockedCompareExchangeAcquire64 (
1642 : __inout LONGLONG volatile *Destination,
1643 : __in LONGLONG ExChange,
1644 : __in LONGLONG Comperand
1645 : );
1646 :
1647 : LONGLONG
1648 : __cdecl
1649 : InterlockedCompareExchangeRelease64 (
1650 : __inout LONGLONG volatile *Destination,
1651 : __in LONGLONG ExChange,
1652 : __in LONGLONG Comperand
1653 : );
1654 :
1655 : LONG64
1656 : __cdecl
1657 : InterlockedCompare64Exchange128(
1658 : __inout LONG64 volatile * Destination,
1659 : __in LONG64 ExchangeHigh,
1660 : __in LONG64 ExchangeLow,
1661 : __in LONG64 Comperand
1662 : );
1663 :
1664 : LONG64
1665 : __cdecl
1666 : InterlockedCompare64ExchangeAcquire128(
1667 : __inout LONG64 volatile * Destination,
1668 : __in LONG64 ExchangeHigh,
1669 : __in LONG64 ExchangeLow,
1670 : __in LONG64 Comperand
1671 : );
1672 :
1673 : LONG64
1674 : __cdecl
1675 : InterlockedCompare64ExchangeRelease128(
1676 : __inout LONG64 volatile * Destination,
1677 : __in LONG64 ExchangeHigh,
1678 : __in LONG64 ExchangeLow,
1679 : __in LONG64 Comperand
1680 : );
1681 :
1682 : LONG
1683 : __cdecl
1684 : InterlockedIncrement (
1685 : __inout LONG volatile *lpAddend
1686 : );
1687 :
1688 : LONG
1689 : __cdecl
1690 : InterlockedDecrement (
1691 : __inout LONG volatile *lpAddend
1692 : );
1693 :
1694 : LONG
1695 : __cdecl
1696 : InterlockedExchange (
1697 : __inout LONG volatile *Target,
1698 : __in LONG Value
1699 : );
1700 :
1701 : LONG
1702 : __cdecl
1703 : InterlockedExchangeAdd (
1704 : __inout LONG volatile *Addend,
1705 : __in LONG Value
1706 : );
1707 :
1708 : LONG
1709 : __cdecl
1710 : InterlockedCompareExchange (
1711 : __inout LONG volatile *Destination,
1712 : __in LONG ExChange,
1713 : __in LONG Comperand
1714 : );
1715 :
1716 : LONG
1717 : __cdecl
1718 : InterlockedCompareExchangeRelease (
1719 : __inout LONG volatile *Destination,
1720 : __in LONG ExChange,
1721 : __in LONG Comperand
1722 : );
1723 :
1724 : LONG
1725 : __cdecl
1726 : InterlockedCompareExchangeAcquire (
1727 : __inout LONG volatile *Destination,
1728 : __in LONG ExChange,
1729 : __in LONG Comperand
1730 : );
1731 :
1732 : PVOID
1733 : __cdecl
1734 : InterlockedExchangePointer (
1735 : __inout PVOID volatile *Target,
1736 : __in_opt PVOID Value
1737 : );
1738 :
1739 : PVOID
1740 : __cdecl
1741 : InterlockedCompareExchangePointer (
1742 : __inout PVOID volatile *Destination,
1743 : __in_opt PVOID ExChange,
1744 : __in_opt PVOID Comperand
1745 : );
1746 :
1747 : PVOID
1748 : __cdecl
1749 : InterlockedCompareExchangePointerAcquire (
1750 : __inout PVOID volatile *Destination,
1751 : __in_opt PVOID Exchange,
1752 : __in_opt PVOID Comperand
1753 : );
1754 :
1755 : PVOID
1756 : __cdecl
1757 : InterlockedCompareExchangePointerRelease (
1758 : __inout PVOID volatile *Destination,
1759 : __in_opt PVOID Exchange,
1760 : __in_opt PVOID Comperand
1761 : );
1762 :
1763 :
1764 : #if !defined(MIDL_PASS)
1765 :
1766 : #if !defined (InterlockedAnd)
1767 :
1768 : #define InterlockedAnd InterlockedAnd_Inline
1769 :
1770 : FORCEINLINE
1771 : LONG
1772 : InterlockedAnd_Inline (
1773 : __inout LONG volatile *Target,
1774 : __in LONG Set
1775 : )
1776 : {
1777 : LONG i;
1778 : LONG j;
1779 :
1780 : j = *Target;
1781 : do {
1782 : i = j;
1783 : j = InterlockedCompareExchange(Target,
1784 : i & Set,
1785 : i);
1786 :
1787 : } while (i != j);
1788 :
1789 : return j;
1790 : }
1791 :
1792 : #endif
1793 :
1794 : #if !defined (InterlockedOr)
1795 :
1796 : #define InterlockedOr InterlockedOr_Inline
1797 :
1798 : FORCEINLINE
1799 : LONG
1800 : InterlockedOr_Inline (
1801 : __inout LONG volatile *Target,
1802 : __in LONG Set
1803 : )
1804 : {
1805 : LONG i;
1806 : LONG j;
1807 :
1808 : j = *Target;
1809 : do {
1810 : i = j;
1811 : j = InterlockedCompareExchange(Target,
1812 : i | Set,
1813 : i);
1814 :
1815 : } while (i != j);
1816 :
1817 : return j;
1818 : }
1819 :
1820 : #endif
1821 :
1822 : #if !defined (InterlockedXor)
1823 :
1824 : #define InterlockedXor InterlockedXor_Inline
1825 :
1826 : FORCEINLINE
1827 : LONG
1828 : InterlockedXor_Inline (
1829 : __inout LONG volatile *Target,
1830 : __in LONG Set
1831 : )
1832 : {
1833 : LONG i;
1834 : LONG j;
1835 :
1836 : j = *Target;
1837 : do {
1838 : i = j;
1839 : j = InterlockedCompareExchange(Target,
1840 : i ^ Set,
1841 : i);
1842 :
1843 : } while (i != j);
1844 :
1845 : return j;
1846 : }
1847 :
1848 : #endif
1849 :
1850 : #if !defined (InterlockedAnd64)
1851 :
1852 : #define InterlockedAnd64 InterlockedAnd64_Inline
1853 :
1854 : FORCEINLINE
1855 : LONGLONG
1856 : InterlockedAnd64_Inline (
1857 : __inout LONGLONG volatile *Destination,
1858 : __in LONGLONG Value
1859 : )
1860 : {
1861 : LONGLONG Old;
1862 :
1863 : do {
1864 : Old = *Destination;
1865 : } while (InterlockedCompareExchange64(Destination,
1866 : Old & Value,
1867 : Old) != Old);
1868 :
1869 : return Old;
1870 : }
1871 :
1872 : #endif
1873 :
1874 : #if !defined (InterlockedOr64)
1875 :
1876 : #define InterlockedOr64 InterlockedOr64_Inline
1877 :
1878 : FORCEINLINE
1879 : LONGLONG
1880 : InterlockedOr64_Inline (
1881 : __inout LONGLONG volatile *Destination,
1882 : __in LONGLONG Value
1883 : )
1884 : {
1885 : LONGLONG Old;
1886 :
1887 : do {
1888 : Old = *Destination;
1889 : } while (InterlockedCompareExchange64(Destination,
1890 : Old | Value,
1891 : Old) != Old);
1892 :
1893 : return Old;
1894 : }
1895 :
1896 : #endif
1897 :
1898 : #if !defined (InterlockedXor64)
1899 :
1900 : #define InterlockedXor64 InterlockedXor64_Inline
1901 :
1902 : FORCEINLINE
1903 : LONGLONG
1904 : InterlockedXor64_Inline (
1905 : __inout LONGLONG volatile *Destination,
1906 : __in LONGLONG Value
1907 : )
1908 : {
1909 : LONGLONG Old;
1910 :
1911 : do {
1912 : Old = *Destination;
1913 : } while (InterlockedCompareExchange64(Destination,
1914 : Old ^ Value,
1915 : Old) != Old);
1916 :
1917 : return Old;
1918 : }
1919 :
1920 : #endif
1921 :
1922 : #if !defined (InterlockedBitTestAndSet)
1923 :
1924 : #define InterlockedBitTestAndSet InterlockedBitTestAndSet_Inline
1925 :
1926 : FORCEINLINE
1927 : BOOLEAN
1928 : InterlockedBitTestAndSet_Inline (
1929 : __inout LONG volatile *Base,
1930 : __in LONG Bit
1931 : )
1932 : {
1933 : LONG tBit;
1934 :
1935 : tBit = 1<<(Bit & (sizeof (*Base)*8-1));
1936 : return (BOOLEAN)((InterlockedOr(&Base[Bit/(sizeof(*Base)*8)], tBit)&tBit) != 0);
1937 : }
1938 :
1939 : #endif
1940 :
1941 : #if !defined (InterlockedBitTestAndReset)
1942 :
1943 : #define InterlockedBitTestAndReset InterlockedBitTestAndReset_Inline
1944 :
1945 : FORCEINLINE
1946 : BOOLEAN
1947 : InterlockedBitTestAndReset_Inline (
1948 : __inout LONG volatile *Base,
1949 : __in LONG Bit
1950 : )
1951 : {
1952 : LONG tBit;
1953 :
1954 : tBit = 1<<(Bit & (sizeof (*Base)*8-1));
1955 : return (BOOLEAN)((InterlockedAnd(&Base[Bit/(sizeof(*Base)*8)], ~tBit)&tBit) != 0);
1956 : }
1957 :
1958 : #endif
1959 :
1960 : #if !defined (InterlockedBitTestAndComplement)
1961 :
1962 : #define InterlockedBitTestAndComplement InterlockedBitTestAndComplement_Inline
1963 :
1964 : FORCEINLINE
1965 : BOOLEAN
1966 : InterlockedBitTestAndComplement_Inline (
1967 : __inout LONG volatile *Base,
1968 : __in LONG Bit
1969 : )
1970 : {
1971 : LONG tBit;
1972 :
1973 : tBit = 1<<(Bit & (sizeof (*Base)*8-1));
1974 : return (BOOLEAN)((InterlockedXor(&Base[Bit/(sizeof(*Base)*8)], tBit)&tBit) != 0);
1975 : }
1976 :
1977 : #endif
1978 : #endif
1979 :
1980 : #pragma intrinsic(_InterlockedIncrement)
1981 : #pragma intrinsic(_InterlockedIncrement_acq)
1982 : #pragma intrinsic(_InterlockedIncrement_rel)
1983 : #pragma intrinsic(_InterlockedDecrement)
1984 : #pragma intrinsic(_InterlockedDecrement_acq)
1985 : #pragma intrinsic(_InterlockedDecrement_rel)
1986 : #pragma intrinsic(_InterlockedExchange)
1987 : #pragma intrinsic(_InterlockedExchangeAdd)
1988 : #pragma intrinsic(_InterlockedCompareExchange)
1989 : #pragma intrinsic(_InterlockedCompareExchange_acq)
1990 : #pragma intrinsic(_InterlockedCompareExchange_rel)
1991 : #pragma intrinsic(_InterlockedExchangePointer)
1992 : #pragma intrinsic(_InterlockedCompareExchangePointer)
1993 : #pragma intrinsic(_InterlockedCompareExchangePointer_acq)
1994 : #pragma intrinsic(_InterlockedCompareExchangePointer_rel)
1995 : #pragma intrinsic(_InterlockedIncrement64)
1996 : #pragma intrinsic(_InterlockedDecrement64)
1997 : #pragma intrinsic(_InterlockedExchange64)
1998 : #pragma intrinsic(_InterlockedExchange64_acq)
1999 : #pragma intrinsic(_InterlockedCompareExchange64)
2000 : #pragma intrinsic(_InterlockedCompareExchange64_acq)
2001 : #pragma intrinsic(_InterlockedCompareExchange64_rel)
2002 : #pragma intrinsic(_InterlockedExchangeAdd64)
2003 : #pragma intrinsic (_InterlockedOr)
2004 : #pragma intrinsic (_InterlockedOr_acq)
2005 : #pragma intrinsic (_InterlockedOr_rel)
2006 : #pragma intrinsic (_InterlockedOr8)
2007 : #pragma intrinsic (_InterlockedOr8_acq)
2008 : #pragma intrinsic (_InterlockedOr8_rel)
2009 : #pragma intrinsic (_InterlockedOr16)
2010 : #pragma intrinsic (_InterlockedOr16_acq)
2011 : #pragma intrinsic (_InterlockedOr16_rel)
2012 : #pragma intrinsic (_InterlockedOr64)
2013 : #pragma intrinsic (_InterlockedOr64_acq)
2014 : #pragma intrinsic (_InterlockedOr64_rel)
2015 : #pragma intrinsic (_InterlockedXor)
2016 : #pragma intrinsic (_InterlockedXor_acq)
2017 : #pragma intrinsic (_InterlockedXor_rel)
2018 : #pragma intrinsic (_InterlockedXor8)
2019 : #pragma intrinsic (_InterlockedXor8_acq)
2020 : #pragma intrinsic (_InterlockedXor8_rel)
2021 : #pragma intrinsic (_InterlockedXor16)
2022 : #pragma intrinsic (_InterlockedXor16_acq)
2023 : #pragma intrinsic (_InterlockedXor16_rel)
2024 : #pragma intrinsic (_InterlockedXor64)
2025 : #pragma intrinsic (_InterlockedXor64_acq)
2026 : #pragma intrinsic (_InterlockedXor64_rel)
2027 : #pragma intrinsic (_InterlockedAnd)
2028 : #pragma intrinsic (_InterlockedAnd_acq)
2029 : #pragma intrinsic (_InterlockedAnd_rel)
2030 : #pragma intrinsic (_InterlockedAnd8)
2031 : #pragma intrinsic (_InterlockedAnd8_acq)
2032 : #pragma intrinsic (_InterlockedAnd8_rel)
2033 : #pragma intrinsic (_InterlockedAnd16)
2034 : #pragma intrinsic (_InterlockedAnd16_acq)
2035 : #pragma intrinsic (_InterlockedAnd16_rel)
2036 : #pragma intrinsic (_InterlockedAnd64)
2037 : #pragma intrinsic (_InterlockedAnd64_acq)
2038 : #pragma intrinsic (_InterlockedAnd64_rel)
2039 :
2040 : #elif defined(_M_AMD64) && !defined(RC_INVOKED)
2041 :
2042 : #define InterlockedAnd _InterlockedAnd
2043 : #define InterlockedOr _InterlockedOr
2044 : #define InterlockedXor _InterlockedXor
2045 : #define InterlockedIncrement _InterlockedIncrement
2046 : #define InterlockedIncrementAcquire InterlockedIncrement
2047 : #define InterlockedIncrementRelease InterlockedIncrement
2048 : #define InterlockedDecrement _InterlockedDecrement
2049 : #define InterlockedDecrementAcquire InterlockedDecrement
2050 : #define InterlockedDecrementRelease InterlockedDecrement
2051 : #define InterlockedExchange _InterlockedExchange
2052 : #define InterlockedExchangeAdd _InterlockedExchangeAdd
2053 : #define InterlockedCompareExchange _InterlockedCompareExchange
2054 : #define InterlockedCompareExchangeAcquire InterlockedCompareExchange
2055 : #define InterlockedCompareExchangeRelease InterlockedCompareExchange
2056 : #define InterlockedExchangePointer _InterlockedExchangePointer
2057 : #define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
2058 : #define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer
2059 : #define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer
2060 :
2061 : #define InterlockedAnd64 _InterlockedAnd64
2062 : #define InterlockedOr64 _InterlockedOr64
2063 : #define InterlockedXor64 _InterlockedXor64
2064 : #define InterlockedIncrement64 _InterlockedIncrement64
2065 : #define InterlockedDecrement64 _InterlockedDecrement64
2066 : #define InterlockedExchange64 _InterlockedExchange64
2067 : #define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
2068 : #define InterlockedCompareExchange64 _InterlockedCompareExchange64
2069 : #define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
2070 : #define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
2071 :
2072 :
2073 : LONG
2074 : InterlockedAnd (
2075 : __inout LONG volatile *Destination,
2076 : __in LONG Value
2077 : );
2078 :
2079 : LONG
2080 : InterlockedOr (
2081 : __inout LONG volatile *Destination,
2082 : __in LONG Value
2083 : );
2084 :
2085 : LONG
2086 : InterlockedXor (
2087 : __inout LONG volatile *Destination,
2088 : __in LONG Value
2089 : );
2090 :
2091 : LONG
2092 : InterlockedIncrement (
2093 : __inout LONG volatile *Addend
2094 : );
2095 :
2096 : LONG
2097 : InterlockedDecrement (
2098 : __inout LONG volatile *Addend
2099 : );
2100 :
2101 : LONG
2102 : InterlockedExchange (
2103 : __inout LONG volatile *Target,
2104 : __in LONG Value
2105 : );
2106 :
2107 : LONG
2108 : InterlockedExchangeAdd (
2109 : __inout LONG volatile *Addend,
2110 : __in LONG Value
2111 : );
2112 :
2113 : LONG
2114 : InterlockedCompareExchange (
2115 : __inout LONG volatile *Destination,
2116 : __in LONG ExChange,
2117 : __in LONG Comperand
2118 : );
2119 :
2120 : PVOID
2121 : InterlockedCompareExchangePointer (
2122 : __inout PVOID volatile *Destination,
2123 : __in_opt PVOID Exchange,
2124 : __in_opt PVOID Comperand
2125 : );
2126 :
2127 : PVOID
2128 : InterlockedExchangePointer (
2129 : __inout PVOID volatile *Target,
2130 : __in_opt PVOID Value
2131 : );
2132 :
2133 : LONG64
2134 : InterlockedAnd64 (
2135 : __inout LONG64 volatile *Destination,
2136 : __in LONG64 Value
2137 : );
2138 :
2139 : LONG64
2140 : InterlockedOr64 (
2141 : __inout LONG64 volatile *Destination,
2142 : __in LONG64 Value
2143 : );
2144 :
2145 : LONG64
2146 : InterlockedXor64 (
2147 : __inout LONG64 volatile *Destination,
2148 : __in LONG64 Value
2149 : );
2150 :
2151 : LONG64
2152 : InterlockedIncrement64 (
2153 : __inout LONG64 volatile *Addend
2154 : );
2155 :
2156 : LONG64
2157 : InterlockedDecrement64 (
2158 : __inout LONG64 volatile *Addend
2159 : );
2160 :
2161 : LONG64
2162 : InterlockedExchange64 (
2163 : __inout LONG64 volatile *Target,
2164 : __in LONG64 Value
2165 : );
2166 :
2167 : LONG64
2168 : InterlockedExchangeAdd64 (
2169 : __inout LONG64 volatile *Addend,
2170 : __in LONG64 Value
2171 : );
2172 :
2173 : LONG64
2174 : InterlockedCompareExchange64 (
2175 : __inout LONG64 volatile *Destination,
2176 : __in LONG64 ExChange,
2177 : __in LONG64 Comperand
2178 : );
2179 :
2180 : #pragma intrinsic(_InterlockedAnd)
2181 : #pragma intrinsic(_InterlockedOr)
2182 : #pragma intrinsic(_InterlockedXor)
2183 : #pragma intrinsic(_InterlockedIncrement)
2184 : #pragma intrinsic(_InterlockedDecrement)
2185 : #pragma intrinsic(_InterlockedExchange)
2186 : #pragma intrinsic(_InterlockedExchangeAdd)
2187 : #pragma intrinsic(_InterlockedCompareExchange)
2188 : #pragma intrinsic(_InterlockedExchangePointer)
2189 : #pragma intrinsic(_InterlockedCompareExchangePointer)
2190 : #pragma intrinsic(_InterlockedAnd64)
2191 : #pragma intrinsic(_InterlockedOr64)
2192 : #pragma intrinsic(_InterlockedXor64)
2193 : #pragma intrinsic(_InterlockedIncrement64)
2194 : #pragma intrinsic(_InterlockedDecrement64)
2195 : #pragma intrinsic(_InterlockedExchange64)
2196 : #pragma intrinsic(_InterlockedExchangeAdd64)
2197 : #pragma intrinsic(_InterlockedCompareExchange64)
2198 :
2199 : #if _MSC_FULL_VER >= 140041204
2200 :
2201 : #define InterlockedAnd8 _InterlockedAnd8
2202 : #define InterlockedOr8 _InterlockedOr8
2203 : #define InterlockedXor8 _InterlockedXor8
2204 : #define InterlockedAnd16 _InterlockedAnd16
2205 : #define InterlockedOr16 _InterlockedOr16
2206 : #define InterlockedXor16 _InterlockedXor16
2207 :
2208 : char
2209 : InterlockedAnd8 (
2210 : __inout char volatile *Destination,
2211 : __in char Value
2212 : );
2213 :
2214 : char
2215 : InterlockedOr8 (
2216 : __inout char volatile *Destination,
2217 : __in char Value
2218 : );
2219 :
2220 : char
2221 : InterlockedXor8 (
2222 : __inout char volatile *Destination,
2223 : __in char Value
2224 : );
2225 :
2226 : SHORT
2227 : InterlockedAnd16(
2228 : __inout SHORT volatile *Destination,
2229 : __in SHORT Value
2230 : );
2231 :
2232 : SHORT
2233 : InterlockedOr16(
2234 : __inout SHORT volatile *Destination,
2235 : __in SHORT Value
2236 : );
2237 :
2238 : SHORT
2239 : InterlockedXor16(
2240 : __inout SHORT volatile *Destination,
2241 : __in SHORT Value
2242 : );
2243 :
2244 : #pragma intrinsic (_InterlockedAnd8)
2245 : #pragma intrinsic (_InterlockedOr8)
2246 : #pragma intrinsic (_InterlockedXor8)
2247 : #pragma intrinsic (_InterlockedAnd16)
2248 : #pragma intrinsic (_InterlockedOr16)
2249 : #pragma intrinsic (_InterlockedXor16)
2250 :
2251 : #endif
2252 :
2253 : #else // X86 interlocked definitions
2254 :
2255 : WINBASEAPI
2256 : LONG
2257 : WINAPI
2258 : InterlockedIncrement (
2259 : __inout LONG volatile *lpAddend
2260 : );
2261 :
2262 : WINBASEAPI
2263 : LONG
2264 : WINAPI
2265 : InterlockedDecrement (
2266 : __inout LONG volatile *lpAddend
2267 : );
2268 :
2269 : WINBASEAPI
2270 : LONG
2271 : WINAPI
2272 : InterlockedExchange (
2273 : __inout LONG volatile *Target,
2274 : __in LONG Value
2275 : );
2276 :
2277 : #define InterlockedExchangePointer(Target, Value) \
2278 : (PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value))
2279 :
2280 : WINBASEAPI
2281 : LONG
2282 : WINAPI
2283 : InterlockedExchangeAdd (
2284 : __inout LONG volatile *Addend,
2285 : __in LONG Value
2286 : );
2287 :
2288 : WINBASEAPI
2289 : LONG
2290 : WINAPI
2291 : InterlockedCompareExchange (
2292 : __inout LONG volatile *Destination,
2293 : __in LONG Exchange,
2294 : __in LONG Comperand
2295 : );
2296 :
2297 : #if (_WIN32_WINNT >= 0x0502)
2298 :
2299 : WINBASEAPI
2300 : LONGLONG
2301 : WINAPI
2302 : InterlockedCompareExchange64 (
2303 : __inout LONGLONG volatile *Destination,
2304 : __in LONGLONG Exchange,
2305 : __in LONGLONG Comperand
2306 : );
2307 :
2308 : #endif
2309 :
2310 : #if !defined(MIDL_PASS)
2311 :
2312 : #if (_WIN32_WINNT >= 0x0502)
2313 :
2314 : FORCEINLINE
2315 : LONGLONG
2316 : InterlockedAnd64 (
2317 : __inout LONGLONG volatile *Destination,
2318 : __in LONGLONG Value
2319 : )
2320 : {
2321 : LONGLONG Old;
2322 :
2323 : do {
2324 : Old = *Destination;
2325 : } while (InterlockedCompareExchange64(Destination,
2326 : Old & Value,
2327 : Old) != Old);
2328 :
2329 : return Old;
2330 : }
2331 :
2332 : FORCEINLINE
2333 : LONGLONG
2334 : InterlockedOr64 (
2335 : __inout LONGLONG volatile *Destination,
2336 : __in LONGLONG Value
2337 : )
2338 : {
2339 : LONGLONG Old;
2340 :
2341 : do {
2342 : Old = *Destination;
2343 : } while (InterlockedCompareExchange64(Destination,
2344 : Old | Value,
2345 : Old) != Old);
2346 :
2347 : return Old;
2348 : }
2349 :
2350 : FORCEINLINE
2351 : LONGLONG
2352 : InterlockedXor64 (
2353 : __inout LONGLONG volatile *Destination,
2354 : __in LONGLONG Value
2355 : )
2356 : {
2357 : LONGLONG Old;
2358 :
2359 : do {
2360 : Old = *Destination;
2361 : } while (InterlockedCompareExchange64(Destination,
2362 : Old ^ Value,
2363 : Old) != Old);
2364 :
2365 : return Old;
2366 : }
2367 :
2368 : FORCEINLINE
2369 : LONGLONG
2370 : InterlockedIncrement64 (
2371 : __inout LONGLONG volatile *Addend
2372 : )
2373 : {
2374 : LONGLONG Old;
2375 :
2376 : do {
2377 : Old = *Addend;
2378 : } while (InterlockedCompareExchange64(Addend,
2379 : Old + 1,
2380 : Old) != Old);
2381 :
2382 : return Old + 1;
2383 : }
2384 :
2385 : FORCEINLINE
2386 : LONGLONG
2387 : InterlockedDecrement64 (
2388 : __inout LONGLONG volatile *Addend
2389 : )
2390 : {
2391 : LONGLONG Old;
2392 :
2393 : do {
2394 : Old = *Addend;
2395 : } while (InterlockedCompareExchange64(Addend,
2396 : Old - 1,
2397 : Old) != Old);
2398 :
2399 : return Old - 1;
2400 : }
2401 :
2402 : FORCEINLINE
2403 : LONGLONG
2404 : InterlockedExchange64 (
2405 : __inout LONGLONG volatile *Target,
2406 : __in LONGLONG Value
2407 : )
2408 : {
2409 : LONGLONG Old;
2410 :
2411 : do {
2412 : Old = *Target;
2413 : } while (InterlockedCompareExchange64(Target,
2414 : Value,
2415 : Old) != Old);
2416 :
2417 : return Old;
2418 : }
2419 :
2420 : FORCEINLINE
2421 : LONGLONG
2422 : InterlockedExchangeAdd64(
2423 : __inout LONGLONG volatile *Addend,
2424 : __in LONGLONG Value
2425 : )
2426 : {
2427 : LONGLONG Old;
2428 :
2429 : do {
2430 : Old = *Addend;
2431 : } while (InterlockedCompareExchange64(Addend,
2432 : Old + Value,
2433 : Old) != Old);
2434 :
2435 : return Old;
2436 : }
2437 :
2438 : #endif
2439 :
2440 :
2441 : #endif
2442 :
2443 : //
2444 : // Use a function for C++ so X86 will generate the same errors as RISC.
2445 : //
2446 :
2447 : #ifdef __cplusplus
2448 :
2449 : FORCEINLINE
2450 : PVOID
2451 : #if !defined(_M_CEE_PURE)
2452 : __cdecl
2453 : #endif
2454 : __InlineInterlockedCompareExchangePointer (
2455 : __inout PVOID volatile *Destination,
2456 : __in_opt PVOID ExChange,
2457 : __in_opt PVOID Comperand
2458 : )
2459 0 : {
2460 0 : return((PVOID)(LONG_PTR)InterlockedCompareExchange((LONG volatile *)Destination, (LONG)(LONG_PTR)ExChange, (LONG)(LONG_PTR)Comperand));
2461 0 : }
2462 :
2463 : #define InterlockedCompareExchangePointer __InlineInterlockedCompareExchangePointer
2464 :
2465 : #else
2466 :
2467 : #define InterlockedCompareExchangePointer(Destination, ExChange, Comperand) \
2468 : (PVOID)(LONG_PTR)InterlockedCompareExchange((LONG volatile *)(Destination), (LONG)(LONG_PTR)(ExChange), (LONG)(LONG_PTR)(Comperand))
2469 :
2470 : #endif /* __cplusplus */
2471 :
2472 : #define InterlockedIncrementAcquire InterlockedIncrement
2473 : #define InterlockedIncrementRelease InterlockedIncrement
2474 : #define InterlockedDecrementAcquire InterlockedDecrement
2475 : #define InterlockedDecrementRelease InterlockedDecrement
2476 : #define InterlockedIncrementAcquire InterlockedIncrement
2477 : #define InterlockedIncrementRelease InterlockedIncrement
2478 : #define InterlockedCompareExchangeAcquire InterlockedCompareExchange
2479 : #define InterlockedCompareExchangeRelease InterlockedCompareExchange
2480 : #define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
2481 : #define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
2482 : #define InterlockedCompareExchangePointerAcquire InterlockedCompareExchangePointer
2483 : #define InterlockedCompareExchangePointerRelease InterlockedCompareExchangePointer
2484 :
2485 : #endif /* X86 | IA64 */
2486 :
2487 : #if defined(_SLIST_HEADER_) && !defined(_NTOSP_)
2488 :
2489 : WINBASEAPI
2490 : VOID
2491 : WINAPI
2492 : InitializeSListHead (
2493 : __inout PSLIST_HEADER ListHead
2494 : );
2495 :
2496 : WINBASEAPI
2497 : PSLIST_ENTRY
2498 : WINAPI
2499 : InterlockedPopEntrySList (
2500 : __inout PSLIST_HEADER ListHead
2501 : );
2502 :
2503 : WINBASEAPI
2504 : PSLIST_ENTRY
2505 : WINAPI
2506 : InterlockedPushEntrySList (
2507 : __inout PSLIST_HEADER ListHead,
2508 : __inout PSLIST_ENTRY ListEntry
2509 : );
2510 :
2511 : WINBASEAPI
2512 : PSLIST_ENTRY
2513 : WINAPI
2514 : InterlockedFlushSList (
2515 : __inout PSLIST_HEADER ListHead
2516 : );
2517 :
2518 : WINBASEAPI
2519 : USHORT
2520 : WINAPI
2521 : QueryDepthSList (
2522 : __in PSLIST_HEADER ListHead
2523 : );
2524 :
2525 : #endif /* _SLIST_HEADER_ */
2526 :
2527 : #endif /* _NTOS_ */
2528 :
2529 : #endif /* NOWINBASEINTERLOCK */
2530 :
2531 : WINBASEAPI
2532 : BOOL
2533 : WINAPI
2534 : FreeResource(
2535 : __in HGLOBAL hResData
2536 : );
2537 :
2538 : WINBASEAPI
2539 : LPVOID
2540 : WINAPI
2541 : LockResource(
2542 : __in HGLOBAL hResData
2543 : );
2544 :
2545 : #define UnlockResource(hResData) ((hResData), 0)
2546 : #define MAXINTATOM 0xC000
2547 : #define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i)))
2548 : #define INVALID_ATOM ((ATOM)0)
2549 :
2550 : int
2551 : #if !defined(_MAC)
2552 : #if defined(_M_CEE_PURE)
2553 : __clrcall
2554 : #else
2555 : WINAPI
2556 : #endif
2557 : #else
2558 : CALLBACK
2559 : #endif
2560 : WinMain (
2561 : __in HINSTANCE hInstance,
2562 : __in_opt HINSTANCE hPrevInstance,
2563 : __in_opt LPSTR lpCmdLine,
2564 : __in int nShowCmd
2565 : );
2566 :
2567 : int
2568 : #if defined(_M_CEE_PURE)
2569 : __clrcall
2570 : #else
2571 : WINAPI
2572 : #endif
2573 : wWinMain(
2574 : __in HINSTANCE hInstance,
2575 : __in_opt HINSTANCE hPrevInstance,
2576 : __in_opt LPWSTR lpCmdLine,
2577 : __in int nShowCmd
2578 : );
2579 :
2580 : WINBASEAPI
2581 : BOOL
2582 : WINAPI
2583 : FreeLibrary (
2584 : __in HMODULE hLibModule
2585 : );
2586 :
2587 :
2588 : WINBASEAPI
2589 : DECLSPEC_NORETURN
2590 : VOID
2591 : WINAPI
2592 : FreeLibraryAndExitThread (
2593 : __in HMODULE hLibModule,
2594 : __in DWORD dwExitCode
2595 : );
2596 :
2597 : WINBASEAPI
2598 : BOOL
2599 : WINAPI
2600 : DisableThreadLibraryCalls (
2601 : __in HMODULE hLibModule
2602 : );
2603 :
2604 : WINBASEAPI
2605 : FARPROC
2606 : WINAPI
2607 : GetProcAddress (
2608 : __in HMODULE hModule,
2609 : __in LPCSTR lpProcName
2610 : );
2611 :
2612 : WINBASEAPI
2613 : DWORD
2614 : WINAPI
2615 : GetVersion (
2616 : VOID
2617 : );
2618 :
2619 : WINBASEAPI
2620 : __out_opt
2621 : HGLOBAL
2622 : WINAPI
2623 : GlobalAlloc (
2624 : __in UINT uFlags,
2625 : __in SIZE_T dwBytes
2626 : );
2627 :
2628 : WINBASEAPI
2629 : __out_opt
2630 : HGLOBAL
2631 : WINAPI
2632 : GlobalReAlloc (
2633 : __in HGLOBAL hMem,
2634 : __in SIZE_T dwBytes,
2635 : __in UINT uFlags
2636 : );
2637 :
2638 : WINBASEAPI
2639 : SIZE_T
2640 : WINAPI
2641 : GlobalSize (
2642 : __in HGLOBAL hMem
2643 : );
2644 :
2645 : WINBASEAPI
2646 : UINT
2647 : WINAPI
2648 : GlobalFlags (
2649 : __in HGLOBAL hMem
2650 : );
2651 :
2652 : WINBASEAPI
2653 : __out_opt
2654 : LPVOID
2655 : WINAPI
2656 : GlobalLock (
2657 : __in HGLOBAL hMem
2658 : );
2659 :
2660 : WINBASEAPI
2661 : __out_opt
2662 : HGLOBAL
2663 : WINAPI
2664 : GlobalHandle (
2665 : __in LPCVOID pMem
2666 : );
2667 :
2668 : WINBASEAPI
2669 : BOOL
2670 : WINAPI
2671 : GlobalUnlock(
2672 : __in HGLOBAL hMem
2673 : );
2674 :
2675 : WINBASEAPI
2676 : __out_opt
2677 : HGLOBAL
2678 : WINAPI
2679 : GlobalFree(
2680 : __deref HGLOBAL hMem
2681 : );
2682 :
2683 : WINBASEAPI
2684 : SIZE_T
2685 : WINAPI
2686 : GlobalCompact(
2687 : __in DWORD dwMinFree
2688 : );
2689 :
2690 : WINBASEAPI
2691 : VOID
2692 : WINAPI
2693 : GlobalFix(
2694 : __in HGLOBAL hMem
2695 : );
2696 :
2697 : WINBASEAPI
2698 : VOID
2699 : WINAPI
2700 : GlobalUnfix(
2701 : __in HGLOBAL hMem
2702 : );
2703 :
2704 : WINBASEAPI
2705 : __out
2706 : LPVOID
2707 : WINAPI
2708 : GlobalWire(
2709 : __in HGLOBAL hMem
2710 : );
2711 :
2712 : WINBASEAPI
2713 : BOOL
2714 : WINAPI
2715 : GlobalUnWire(
2716 : __in HGLOBAL hMem
2717 : );
2718 :
2719 : WINBASEAPI
2720 : VOID
2721 : WINAPI
2722 : GlobalMemoryStatus(
2723 : __out LPMEMORYSTATUS lpBuffer
2724 : );
2725 :
2726 : typedef struct _MEMORYSTATUSEX {
2727 : DWORD dwLength;
2728 : DWORD dwMemoryLoad;
2729 : DWORDLONG ullTotalPhys;
2730 : DWORDLONG ullAvailPhys;
2731 : DWORDLONG ullTotalPageFile;
2732 : DWORDLONG ullAvailPageFile;
2733 : DWORDLONG ullTotalVirtual;
2734 : DWORDLONG ullAvailVirtual;
2735 : DWORDLONG ullAvailExtendedVirtual;
2736 : } MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
2737 :
2738 : WINBASEAPI
2739 : BOOL
2740 : WINAPI
2741 : GlobalMemoryStatusEx(
2742 : __out LPMEMORYSTATUSEX lpBuffer
2743 : );
2744 :
2745 : WINBASEAPI
2746 : __out_bcount_opt( "(uFlags&LMEM_FIXED) ? uBytes : 0" )
2747 : HLOCAL
2748 : WINAPI
2749 : LocalAlloc(
2750 : __in UINT uFlags,
2751 : __in SIZE_T uBytes
2752 : );
2753 :
2754 : WINBASEAPI
2755 : __out_opt
2756 : HLOCAL
2757 : WINAPI
2758 : LocalReAlloc(
2759 : __in HLOCAL hMem,
2760 : __in SIZE_T uBytes,
2761 : __in UINT uFlags
2762 : );
2763 :
2764 : WINBASEAPI
2765 : __out_opt
2766 : LPVOID
2767 : WINAPI
2768 : LocalLock(
2769 : __in HLOCAL hMem
2770 : );
2771 :
2772 : WINBASEAPI
2773 : __out_opt
2774 : HLOCAL
2775 : WINAPI
2776 : LocalHandle(
2777 : __in LPCVOID pMem
2778 : );
2779 :
2780 : WINBASEAPI
2781 : BOOL
2782 : WINAPI
2783 : LocalUnlock(
2784 : __in HLOCAL hMem
2785 : );
2786 :
2787 : WINBASEAPI
2788 : SIZE_T
2789 : WINAPI
2790 : LocalSize(
2791 : __in HLOCAL hMem
2792 : );
2793 :
2794 : WINBASEAPI
2795 : UINT
2796 : WINAPI
2797 : LocalFlags(
2798 : __in HLOCAL hMem
2799 : );
2800 :
2801 : WINBASEAPI
2802 : HLOCAL
2803 : WINAPI
2804 : LocalFree(
2805 : __deref HLOCAL hMem
2806 : );
2807 :
2808 : WINBASEAPI
2809 : SIZE_T
2810 : WINAPI
2811 : LocalShrink(
2812 : __in HLOCAL hMem,
2813 : __in UINT cbNewSize
2814 : );
2815 :
2816 : WINBASEAPI
2817 : SIZE_T
2818 : WINAPI
2819 : LocalCompact(
2820 : __in UINT uMinFree
2821 : );
2822 :
2823 : WINBASEAPI
2824 : BOOL
2825 : WINAPI
2826 : FlushInstructionCache(
2827 : __in HANDLE hProcess,
2828 : __in_bcount_opt(dwSize) LPCVOID lpBaseAddress,
2829 : __in SIZE_T dwSize
2830 : );
2831 :
2832 : #if (_WIN32_WINNT >= 0x0600)
2833 :
2834 : WINBASEAPI
2835 : VOID
2836 : WINAPI
2837 : FlushProcessWriteBuffers(
2838 : VOID
2839 : );
2840 :
2841 : WINBASEAPI
2842 : BOOL
2843 : WINAPI
2844 : QueryThreadCycleTime (
2845 : __in HANDLE ThreadHandle,
2846 : __out PULONG64 CycleTime
2847 : );
2848 :
2849 : WINBASEAPI
2850 : BOOL
2851 : WINAPI
2852 : QueryProcessCycleTime (
2853 : __in HANDLE ProcessHandle,
2854 : __out PULONG64 CycleTime
2855 : );
2856 :
2857 : WINBASEAPI
2858 : BOOL
2859 : WINAPI
2860 : QueryIdleProcessorCycleTime (
2861 : __inout PULONG BufferLength,
2862 : __out_bcount_opt(*BufferLength) PULONG64 ProcessorIdleCycleTime
2863 : );
2864 :
2865 : #endif
2866 :
2867 : WINBASEAPI
2868 : __bcount_opt(dwSize)
2869 : LPVOID
2870 : WINAPI
2871 : VirtualAlloc(
2872 : __in_opt LPVOID lpAddress,
2873 : __in SIZE_T dwSize,
2874 : __in DWORD flAllocationType,
2875 : __in DWORD flProtect
2876 : );
2877 :
2878 : WINBASEAPI
2879 : BOOL
2880 : WINAPI
2881 : VirtualFree(
2882 : __in LPVOID lpAddress,
2883 : __in SIZE_T dwSize,
2884 : __in DWORD dwFreeType
2885 : );
2886 :
2887 : WINBASEAPI
2888 : BOOL
2889 : WINAPI
2890 : VirtualProtect(
2891 : __in LPVOID lpAddress,
2892 : __in SIZE_T dwSize,
2893 : __in DWORD flNewProtect,
2894 : __out PDWORD lpflOldProtect
2895 : );
2896 :
2897 : WINBASEAPI
2898 : SIZE_T
2899 : WINAPI
2900 : VirtualQuery(
2901 : __in_opt LPCVOID lpAddress,
2902 : __out_bcount_part(dwLength, return) PMEMORY_BASIC_INFORMATION lpBuffer,
2903 : __in SIZE_T dwLength
2904 : );
2905 :
2906 : WINBASEAPI
2907 : __bcount_opt(dwSize)
2908 : LPVOID
2909 : WINAPI
2910 : VirtualAllocEx(
2911 : __in HANDLE hProcess,
2912 : __in_opt LPVOID lpAddress,
2913 : __in SIZE_T dwSize,
2914 : __in DWORD flAllocationType,
2915 : __in DWORD flProtect
2916 : );
2917 :
2918 : #if _WIN32_WINNT >= 0x0600
2919 :
2920 : WINBASEAPI
2921 : __bcount(dwSize)
2922 : LPVOID
2923 : WINAPI
2924 : VirtualAllocExNuma(
2925 : __in HANDLE hProcess,
2926 : __in_opt LPVOID lpAddress,
2927 : __in SIZE_T dwSize,
2928 : __in DWORD flAllocationType,
2929 : __in DWORD flProtect,
2930 : __in DWORD nndPreferred
2931 : );
2932 :
2933 : #endif // _WIN32_WINNT >= 0x0600
2934 :
2935 : WINBASEAPI
2936 : UINT
2937 : WINAPI
2938 : GetWriteWatch(
2939 : __in DWORD dwFlags,
2940 : __in PVOID lpBaseAddress,
2941 : __in SIZE_T dwRegionSize,
2942 : __out_ecount_part(*lpdwCount, *lpdwCount) PVOID *lpAddresses,
2943 : __inout ULONG_PTR *lpdwCount,
2944 : __out PULONG lpdwGranularity
2945 : );
2946 :
2947 : WINBASEAPI
2948 : UINT
2949 : WINAPI
2950 : ResetWriteWatch(
2951 : __in LPVOID lpBaseAddress,
2952 : __in SIZE_T dwRegionSize
2953 : );
2954 :
2955 : WINBASEAPI
2956 : SIZE_T
2957 : WINAPI
2958 : GetLargePageMinimum(
2959 : VOID
2960 : );
2961 :
2962 : WINBASEAPI
2963 : UINT
2964 : WINAPI
2965 : EnumSystemFirmwareTables(
2966 : __in DWORD FirmwareTableProviderSignature,
2967 : __out_bcount_part_opt(BufferSize, return) PVOID pFirmwareTableEnumBuffer,
2968 : __in DWORD BufferSize
2969 : );
2970 :
2971 : WINBASEAPI
2972 : UINT
2973 : WINAPI
2974 : GetSystemFirmwareTable(
2975 : __in DWORD FirmwareTableProviderSignature,
2976 : __in DWORD FirmwareTableID,
2977 : __out_bcount_part_opt(BufferSize, return) PVOID pFirmwareTableBuffer,
2978 : __in DWORD BufferSize
2979 : );
2980 :
2981 : WINBASEAPI
2982 : BOOL
2983 : WINAPI
2984 : VirtualFreeEx(
2985 : __in HANDLE hProcess,
2986 : __in LPVOID lpAddress,
2987 : __in SIZE_T dwSize,
2988 : __in DWORD dwFreeType
2989 : );
2990 :
2991 : WINBASEAPI
2992 : BOOL
2993 : WINAPI
2994 : VirtualProtectEx(
2995 : __in HANDLE hProcess,
2996 : __in LPVOID lpAddress,
2997 : __in SIZE_T dwSize,
2998 : __in DWORD flNewProtect,
2999 : __out PDWORD lpflOldProtect
3000 : );
3001 :
3002 : WINBASEAPI
3003 : SIZE_T
3004 : WINAPI
3005 : VirtualQueryEx(
3006 : __in HANDLE hProcess,
3007 : __in_opt LPCVOID lpAddress,
3008 : __out_bcount_part(dwLength, return) PMEMORY_BASIC_INFORMATION lpBuffer,
3009 : __in SIZE_T dwLength
3010 : );
3011 :
3012 : WINBASEAPI
3013 : __out_opt
3014 : HANDLE
3015 : WINAPI
3016 : HeapCreate(
3017 : __in DWORD flOptions,
3018 : __in SIZE_T dwInitialSize,
3019 : __in SIZE_T dwMaximumSize
3020 : );
3021 :
3022 : WINBASEAPI
3023 : BOOL
3024 : WINAPI
3025 : HeapDestroy(
3026 : __in HANDLE hHeap
3027 : );
3028 :
3029 : WINBASEAPI
3030 : __bcount(dwBytes)
3031 : LPVOID
3032 : WINAPI
3033 : HeapAlloc(
3034 : __in HANDLE hHeap,
3035 : __in DWORD dwFlags,
3036 : __in SIZE_T dwBytes
3037 : );
3038 :
3039 : WINBASEAPI
3040 : __bcount(dwBytes)
3041 : LPVOID
3042 : WINAPI
3043 : HeapReAlloc(
3044 : __inout HANDLE hHeap,
3045 : __in DWORD dwFlags,
3046 : __deref LPVOID lpMem,
3047 : __in SIZE_T dwBytes
3048 : );
3049 :
3050 : WINBASEAPI
3051 : BOOL
3052 : WINAPI
3053 : HeapFree(
3054 : __inout HANDLE hHeap,
3055 : __in DWORD dwFlags,
3056 : __deref LPVOID lpMem
3057 : );
3058 :
3059 : WINBASEAPI
3060 : SIZE_T
3061 : WINAPI
3062 : HeapSize(
3063 : __in HANDLE hHeap,
3064 : __in DWORD dwFlags,
3065 : __in LPCVOID lpMem
3066 : );
3067 :
3068 : WINBASEAPI
3069 : BOOL
3070 : WINAPI
3071 : HeapValidate(
3072 : __in HANDLE hHeap,
3073 : __in DWORD dwFlags,
3074 : __in_opt LPCVOID lpMem
3075 : );
3076 :
3077 : WINBASEAPI
3078 : SIZE_T
3079 : WINAPI
3080 : HeapCompact(
3081 : __in HANDLE hHeap,
3082 : __in DWORD dwFlags
3083 : );
3084 :
3085 : WINBASEAPI
3086 : __out
3087 : HANDLE
3088 : WINAPI
3089 : GetProcessHeap( VOID );
3090 :
3091 : WINBASEAPI
3092 : DWORD
3093 : WINAPI
3094 : GetProcessHeaps(
3095 : __in DWORD NumberOfHeaps,
3096 : __out_ecount_part(NumberOfHeaps, return) PHANDLE ProcessHeaps
3097 : );
3098 :
3099 : typedef struct _PROCESS_HEAP_ENTRY {
3100 : PVOID lpData;
3101 : DWORD cbData;
3102 : BYTE cbOverhead;
3103 : BYTE iRegionIndex;
3104 : WORD wFlags;
3105 : union {
3106 : struct {
3107 : HANDLE hMem;
3108 : DWORD dwReserved[ 3 ];
3109 : } Block;
3110 : struct {
3111 : DWORD dwCommittedSize;
3112 : DWORD dwUnCommittedSize;
3113 : LPVOID lpFirstBlock;
3114 : LPVOID lpLastBlock;
3115 : } Region;
3116 : };
3117 : } PROCESS_HEAP_ENTRY, *LPPROCESS_HEAP_ENTRY, *PPROCESS_HEAP_ENTRY;
3118 :
3119 : #define PROCESS_HEAP_REGION 0x0001
3120 : #define PROCESS_HEAP_UNCOMMITTED_RANGE 0x0002
3121 : #define PROCESS_HEAP_ENTRY_BUSY 0x0004
3122 : #define PROCESS_HEAP_ENTRY_MOVEABLE 0x0010
3123 : #define PROCESS_HEAP_ENTRY_DDESHARE 0x0020
3124 :
3125 : WINBASEAPI
3126 : BOOL
3127 : WINAPI
3128 : HeapLock(
3129 : __in HANDLE hHeap
3130 : );
3131 :
3132 : WINBASEAPI
3133 : BOOL
3134 : WINAPI
3135 : HeapUnlock(
3136 : __in HANDLE hHeap
3137 : );
3138 :
3139 :
3140 : WINBASEAPI
3141 : BOOL
3142 : WINAPI
3143 : HeapWalk(
3144 : __in HANDLE hHeap,
3145 : __inout LPPROCESS_HEAP_ENTRY lpEntry
3146 : );
3147 :
3148 : WINBASEAPI
3149 : BOOL
3150 : WINAPI
3151 : HeapSetInformation (
3152 : __in_opt HANDLE HeapHandle,
3153 : __in HEAP_INFORMATION_CLASS HeapInformationClass,
3154 : __in_bcount_opt(HeapInformationLength) PVOID HeapInformation,
3155 : __in SIZE_T HeapInformationLength
3156 : );
3157 :
3158 : WINBASEAPI
3159 : BOOL
3160 : WINAPI
3161 : HeapQueryInformation (
3162 : __in_opt HANDLE HeapHandle,
3163 : __in HEAP_INFORMATION_CLASS HeapInformationClass,
3164 : __out_bcount_part_opt(HeapInformationLength, *ReturnLength) PVOID HeapInformation,
3165 : __in SIZE_T HeapInformationLength,
3166 : __out_opt PSIZE_T ReturnLength
3167 : );
3168 :
3169 : // GetBinaryType return values.
3170 :
3171 : #define SCS_32BIT_BINARY 0
3172 : #define SCS_DOS_BINARY 1
3173 : #define SCS_WOW_BINARY 2
3174 : #define SCS_PIF_BINARY 3
3175 : #define SCS_POSIX_BINARY 4
3176 : #define SCS_OS216_BINARY 5
3177 : #define SCS_64BIT_BINARY 6
3178 :
3179 : #if defined(_WIN64)
3180 : # define SCS_THIS_PLATFORM_BINARY SCS_64BIT_BINARY
3181 : #else
3182 : # define SCS_THIS_PLATFORM_BINARY SCS_32BIT_BINARY
3183 : #endif
3184 :
3185 : WINBASEAPI
3186 : BOOL
3187 : WINAPI
3188 : GetBinaryTypeA(
3189 : __in LPCSTR lpApplicationName,
3190 : __out LPDWORD lpBinaryType
3191 : );
3192 : WINBASEAPI
3193 : BOOL
3194 : WINAPI
3195 : GetBinaryTypeW(
3196 : __in LPCWSTR lpApplicationName,
3197 : __out LPDWORD lpBinaryType
3198 : );
3199 : #ifdef UNICODE
3200 : #define GetBinaryType GetBinaryTypeW
3201 : #else
3202 : #define GetBinaryType GetBinaryTypeA
3203 : #endif // !UNICODE
3204 :
3205 : WINBASEAPI
3206 : DWORD
3207 : WINAPI
3208 : GetShortPathNameA(
3209 : __in LPCSTR lpszLongPath,
3210 : __out_ecount_part(cchBuffer, return + 1) LPSTR lpszShortPath,
3211 : __in DWORD cchBuffer
3212 : );
3213 : WINBASEAPI
3214 : DWORD
3215 : WINAPI
3216 : GetShortPathNameW(
3217 : __in LPCWSTR lpszLongPath,
3218 : __out_ecount_part(cchBuffer, return + 1) LPWSTR lpszShortPath,
3219 : __in DWORD cchBuffer
3220 : );
3221 : #ifdef UNICODE
3222 : #define GetShortPathName GetShortPathNameW
3223 : #else
3224 : #define GetShortPathName GetShortPathNameA
3225 : #endif // !UNICODE
3226 :
3227 : WINBASEAPI
3228 : DWORD
3229 : WINAPI
3230 : GetLongPathNameA(
3231 : __in LPCSTR lpszShortPath,
3232 : __out_ecount_part(cchBuffer, return + 1) LPSTR lpszLongPath,
3233 : __in DWORD cchBuffer
3234 : );
3235 : WINBASEAPI
3236 : DWORD
3237 : WINAPI
3238 : GetLongPathNameW(
3239 : __in LPCWSTR lpszShortPath,
3240 : __out_ecount_part(cchBuffer, return + 1) LPWSTR lpszLongPath,
3241 : __in DWORD cchBuffer
3242 : );
3243 : #ifdef UNICODE
3244 : #define GetLongPathName GetLongPathNameW
3245 : #else
3246 : #define GetLongPathName GetLongPathNameA
3247 : #endif // !UNICODE
3248 :
3249 : #if _WIN32_WINNT >= 0x0600
3250 :
3251 : WINBASEAPI
3252 : DWORD
3253 : WINAPI
3254 : GetLongPathNameTransactedA(
3255 : __in LPCSTR lpszShortPath,
3256 : __out_ecount_part(cchBuffer, return + 1) LPSTR lpszLongPath,
3257 : __in DWORD cchBuffer,
3258 : __in HANDLE hTransaction
3259 : );
3260 : WINBASEAPI
3261 : DWORD
3262 : WINAPI
3263 : GetLongPathNameTransactedW(
3264 : __in LPCWSTR lpszShortPath,
3265 : __out_ecount_part(cchBuffer, return + 1) LPWSTR lpszLongPath,
3266 : __in DWORD cchBuffer,
3267 : __in HANDLE hTransaction
3268 : );
3269 : #ifdef UNICODE
3270 : #define GetLongPathNameTransacted GetLongPathNameTransactedW
3271 : #else
3272 : #define GetLongPathNameTransacted GetLongPathNameTransactedA
3273 : #endif // !UNICODE
3274 :
3275 : #endif // _WIN32_WINNT >= 0x0600
3276 :
3277 : WINBASEAPI
3278 : BOOL
3279 : WINAPI
3280 : GetProcessAffinityMask(
3281 : __in HANDLE hProcess,
3282 : __out PDWORD_PTR lpProcessAffinityMask,
3283 : __out PDWORD_PTR lpSystemAffinityMask
3284 : );
3285 :
3286 : WINBASEAPI
3287 : BOOL
3288 : WINAPI
3289 : SetProcessAffinityMask(
3290 : __in HANDLE hProcess,
3291 : __in DWORD_PTR dwProcessAffinityMask
3292 : );
3293 :
3294 : #if _WIN32_WINNT >= 0x0501
3295 :
3296 : WINBASEAPI
3297 : BOOL
3298 : WINAPI
3299 : GetProcessHandleCount(
3300 : __in HANDLE hProcess,
3301 : __out PDWORD pdwHandleCount
3302 : );
3303 :
3304 : #endif // (_WIN32_WINNT >= 0x0501)
3305 :
3306 : WINBASEAPI
3307 : BOOL
3308 : WINAPI
3309 : GetProcessTimes(
3310 : __in HANDLE hProcess,
3311 : __out LPFILETIME lpCreationTime,
3312 : __out LPFILETIME lpExitTime,
3313 : __out LPFILETIME lpKernelTime,
3314 : __out LPFILETIME lpUserTime
3315 : );
3316 :
3317 : WINBASEAPI
3318 : BOOL
3319 : WINAPI
3320 : GetProcessIoCounters(
3321 : __in HANDLE hProcess,
3322 : __out PIO_COUNTERS lpIoCounters
3323 : );
3324 :
3325 : WINBASEAPI
3326 : BOOL
3327 : WINAPI
3328 : GetProcessWorkingSetSize(
3329 : __in HANDLE hProcess,
3330 : __out PSIZE_T lpMinimumWorkingSetSize,
3331 : __out PSIZE_T lpMaximumWorkingSetSize
3332 : );
3333 :
3334 : WINBASEAPI
3335 : BOOL
3336 : WINAPI
3337 : GetProcessWorkingSetSizeEx(
3338 : __in HANDLE hProcess,
3339 : __out PSIZE_T lpMinimumWorkingSetSize,
3340 : __out PSIZE_T lpMaximumWorkingSetSize,
3341 : __out PDWORD Flags
3342 : );
3343 :
3344 : WINBASEAPI
3345 : BOOL
3346 : WINAPI
3347 : SetProcessWorkingSetSize(
3348 : __in HANDLE hProcess,
3349 : __in SIZE_T dwMinimumWorkingSetSize,
3350 : __in SIZE_T dwMaximumWorkingSetSize
3351 : );
3352 :
3353 : WINBASEAPI
3354 : BOOL
3355 : WINAPI
3356 : SetProcessWorkingSetSizeEx(
3357 : __in HANDLE hProcess,
3358 : __in SIZE_T dwMinimumWorkingSetSize,
3359 : __in SIZE_T dwMaximumWorkingSetSize,
3360 : __in DWORD Flags
3361 : );
3362 :
3363 : WINBASEAPI
3364 : HANDLE
3365 : WINAPI
3366 : OpenProcess(
3367 : __in DWORD dwDesiredAccess,
3368 : __in BOOL bInheritHandle,
3369 : __in DWORD dwProcessId
3370 : );
3371 :
3372 : WINBASEAPI
3373 : __out
3374 : HANDLE
3375 : WINAPI
3376 : GetCurrentProcess(
3377 : VOID
3378 : );
3379 :
3380 : WINBASEAPI
3381 : DWORD
3382 : WINAPI
3383 : GetCurrentProcessId(
3384 : VOID
3385 : );
3386 :
3387 : WINBASEAPI
3388 : DECLSPEC_NORETURN
3389 : VOID
3390 : WINAPI
3391 : ExitProcess(
3392 : __in UINT uExitCode
3393 : );
3394 :
3395 : WINBASEAPI
3396 : BOOL
3397 : WINAPI
3398 : TerminateProcess(
3399 : __in HANDLE hProcess,
3400 : __in UINT uExitCode
3401 : );
3402 :
3403 : WINBASEAPI
3404 : BOOL
3405 : WINAPI
3406 : GetExitCodeProcess(
3407 : __in HANDLE hProcess,
3408 : __out LPDWORD lpExitCode
3409 : );
3410 :
3411 : WINBASEAPI
3412 : VOID
3413 : WINAPI
3414 : FatalExit(
3415 : __in int ExitCode
3416 : );
3417 :
3418 : WINBASEAPI
3419 : __out
3420 : __nullnullterminated
3421 : LPCH
3422 : WINAPI
3423 : GetEnvironmentStrings(
3424 : VOID
3425 : );
3426 :
3427 : WINBASEAPI
3428 : __out
3429 : __nullnullterminated
3430 : LPWCH
3431 : WINAPI
3432 : GetEnvironmentStringsW(
3433 : VOID
3434 : );
3435 :
3436 : #ifdef UNICODE
3437 : #define GetEnvironmentStrings GetEnvironmentStringsW
3438 : #else
3439 : #define GetEnvironmentStringsA GetEnvironmentStrings
3440 : #endif // !UNICODE
3441 :
3442 : WINBASEAPI
3443 : BOOL
3444 : WINAPI
3445 : SetEnvironmentStringsA(
3446 : __in __nullnullterminated LPCH NewEnvironment
3447 : );
3448 : WINBASEAPI
3449 : BOOL
3450 : WINAPI
3451 : SetEnvironmentStringsW(
3452 : __in __nullnullterminated LPWCH NewEnvironment
3453 : );
3454 : #ifdef UNICODE
3455 : #define SetEnvironmentStrings SetEnvironmentStringsW
3456 : #else
3457 : #define SetEnvironmentStrings SetEnvironmentStringsA
3458 : #endif // !UNICODE
3459 :
3460 : WINBASEAPI
3461 : BOOL
3462 : WINAPI
3463 : FreeEnvironmentStringsA(
3464 : __in __nullnullterminated LPCH
3465 : );
3466 : WINBASEAPI
3467 : BOOL
3468 : WINAPI
3469 : FreeEnvironmentStringsW(
3470 : __in __nullnullterminated LPWCH
3471 : );
3472 : #ifdef UNICODE
3473 : #define FreeEnvironmentStrings FreeEnvironmentStringsW
3474 : #else
3475 : #define FreeEnvironmentStrings FreeEnvironmentStringsA
3476 : #endif // !UNICODE
3477 :
3478 : WINBASEAPI
3479 : VOID
3480 : WINAPI
3481 : RaiseException(
3482 : __in DWORD dwExceptionCode,
3483 : __in DWORD dwExceptionFlags,
3484 : __in DWORD nNumberOfArguments,
3485 : __in_ecount_opt(nNumberOfArguments) CONST ULONG_PTR *lpArguments
3486 : );
3487 :
3488 : __callback
3489 : WINBASEAPI
3490 : LONG
3491 : WINAPI
3492 : UnhandledExceptionFilter(
3493 : __in struct _EXCEPTION_POINTERS *ExceptionInfo
3494 : );
3495 :
3496 : typedef LONG (WINAPI *PTOP_LEVEL_EXCEPTION_FILTER)(
3497 : __in struct _EXCEPTION_POINTERS *ExceptionInfo
3498 : );
3499 : typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
3500 :
3501 : WINBASEAPI
3502 : LPTOP_LEVEL_EXCEPTION_FILTER
3503 : WINAPI
3504 : SetUnhandledExceptionFilter(
3505 : __in LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter
3506 : );
3507 :
3508 : #if(_WIN32_WINNT >= 0x0400)
3509 :
3510 : //
3511 : // Fiber creation flags
3512 : //
3513 :
3514 : #define FIBER_FLAG_FLOAT_SWITCH 0x1 // context switch floating point
3515 :
3516 : WINBASEAPI
3517 : __out_opt
3518 : LPVOID
3519 : WINAPI
3520 : CreateFiber(
3521 : __in SIZE_T dwStackSize,
3522 : __in LPFIBER_START_ROUTINE lpStartAddress,
3523 : __in_opt LPVOID lpParameter
3524 : );
3525 :
3526 : WINBASEAPI
3527 : __out_opt
3528 : LPVOID
3529 : WINAPI
3530 : CreateFiberEx(
3531 : __in SIZE_T dwStackCommitSize,
3532 : __in SIZE_T dwStackReserveSize,
3533 : __in DWORD dwFlags,
3534 : __in LPFIBER_START_ROUTINE lpStartAddress,
3535 : __in_opt LPVOID lpParameter
3536 : );
3537 :
3538 : WINBASEAPI
3539 : VOID
3540 : WINAPI
3541 : DeleteFiber(
3542 : __in LPVOID lpFiber
3543 : );
3544 :
3545 : WINBASEAPI
3546 : __out_opt
3547 : LPVOID
3548 : WINAPI
3549 : ConvertThreadToFiber(
3550 : __in_opt LPVOID lpParameter
3551 : );
3552 :
3553 : WINBASEAPI
3554 : __out_opt
3555 : LPVOID
3556 : WINAPI
3557 : ConvertThreadToFiberEx(
3558 : __in_opt LPVOID lpParameter,
3559 : __in DWORD dwFlags
3560 : );
3561 :
3562 : #if (_WIN32_WINNT >= 0x0501)
3563 :
3564 : WINBASEAPI
3565 : BOOL
3566 : WINAPI
3567 : ConvertFiberToThread(
3568 : VOID
3569 : );
3570 :
3571 : #endif
3572 :
3573 : #if (_WIN32_WINNT >= 0x0600)
3574 :
3575 : WINBASEAPI
3576 : BOOL
3577 : WINAPI
3578 : IsThreadAFiber(
3579 : VOID
3580 : );
3581 :
3582 : #endif
3583 :
3584 : WINBASEAPI
3585 : VOID
3586 : WINAPI
3587 : SwitchToFiber(
3588 : __in LPVOID lpFiber
3589 : );
3590 :
3591 : WINBASEAPI
3592 : BOOL
3593 : WINAPI
3594 : SwitchToThread(
3595 : VOID
3596 : );
3597 :
3598 : #endif /* _WIN32_WINNT >= 0x0400 */
3599 :
3600 : WINBASEAPI
3601 : __out_opt
3602 : HANDLE
3603 : WINAPI
3604 : CreateThread(
3605 : __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
3606 : __in SIZE_T dwStackSize,
3607 : __in LPTHREAD_START_ROUTINE lpStartAddress,
3608 : __in_opt LPVOID lpParameter,
3609 : __in DWORD dwCreationFlags,
3610 : __out_opt LPDWORD lpThreadId
3611 : );
3612 :
3613 : WINBASEAPI
3614 : __out_opt
3615 : HANDLE
3616 : WINAPI
3617 : CreateRemoteThread(
3618 : __in HANDLE hProcess,
3619 : __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
3620 : __in SIZE_T dwStackSize,
3621 : __in LPTHREAD_START_ROUTINE lpStartAddress,
3622 : __in_opt LPVOID lpParameter,
3623 : __in DWORD dwCreationFlags,
3624 : __out_opt LPDWORD lpThreadId
3625 : );
3626 :
3627 : WINBASEAPI
3628 : __out
3629 : HANDLE
3630 : WINAPI
3631 : GetCurrentThread(
3632 : VOID
3633 : );
3634 :
3635 : WINBASEAPI
3636 : DWORD
3637 : WINAPI
3638 : GetCurrentThreadId(
3639 : VOID
3640 : );
3641 :
3642 : WINBASEAPI
3643 : BOOL
3644 : WINAPI
3645 : SetThreadStackGuarantee (
3646 : __inout PULONG StackSizeInBytes
3647 : );
3648 :
3649 : WINBASEAPI
3650 : DWORD
3651 : WINAPI
3652 : GetProcessIdOfThread(
3653 : __in HANDLE Thread
3654 : );
3655 :
3656 : #if (_WIN32_WINNT >= 0x0502)
3657 :
3658 : WINBASEAPI
3659 : DWORD
3660 : WINAPI
3661 : GetThreadId(
3662 : __in HANDLE Thread
3663 : );
3664 :
3665 : #endif // _WIN32_WINNT >= 0x0502
3666 :
3667 : WINBASEAPI
3668 : DWORD
3669 : WINAPI
3670 : GetProcessId(
3671 : __in HANDLE Process
3672 : );
3673 :
3674 : WINBASEAPI
3675 : DWORD
3676 : WINAPI
3677 : GetCurrentProcessorNumber(
3678 : VOID
3679 : );
3680 :
3681 : WINBASEAPI
3682 : DWORD_PTR
3683 : WINAPI
3684 : SetThreadAffinityMask(
3685 : __in HANDLE hThread,
3686 : __in DWORD_PTR dwThreadAffinityMask
3687 : );
3688 :
3689 : #if(_WIN32_WINNT >= 0x0400)
3690 : WINBASEAPI
3691 : DWORD
3692 : WINAPI
3693 : SetThreadIdealProcessor(
3694 : __in HANDLE hThread,
3695 : __in DWORD dwIdealProcessor
3696 : );
3697 : #endif /* _WIN32_WINNT >= 0x0400 */
3698 :
3699 : WINBASEAPI
3700 : BOOL
3701 : WINAPI
3702 : SetProcessPriorityBoost(
3703 : __in HANDLE hProcess,
3704 : __in BOOL bDisablePriorityBoost
3705 : );
3706 :
3707 : WINBASEAPI
3708 : BOOL
3709 : WINAPI
3710 : GetProcessPriorityBoost(
3711 : __in HANDLE hProcess,
3712 : __out PBOOL pDisablePriorityBoost
3713 : );
3714 :
3715 : WINBASEAPI
3716 : BOOL
3717 : WINAPI
3718 : RequestWakeupLatency(
3719 : __in LATENCY_TIME latency
3720 : );
3721 :
3722 : WINBASEAPI
3723 : BOOL
3724 : WINAPI
3725 : IsSystemResumeAutomatic(
3726 : VOID
3727 : );
3728 :
3729 : WINBASEAPI
3730 : __out_opt
3731 : HANDLE
3732 : WINAPI
3733 : OpenThread(
3734 : __in DWORD dwDesiredAccess,
3735 : __in BOOL bInheritHandle,
3736 : __in DWORD dwThreadId
3737 : );
3738 :
3739 : WINBASEAPI
3740 : BOOL
3741 : WINAPI
3742 : SetThreadPriority(
3743 : __in HANDLE hThread,
3744 : __in int nPriority
3745 : );
3746 :
3747 : WINBASEAPI
3748 : BOOL
3749 : WINAPI
3750 : SetThreadPriorityBoost(
3751 : __in HANDLE hThread,
3752 : __in BOOL bDisablePriorityBoost
3753 : );
3754 :
3755 : WINBASEAPI
3756 : BOOL
3757 : WINAPI
3758 : GetThreadPriorityBoost(
3759 : __in HANDLE hThread,
3760 : __out PBOOL pDisablePriorityBoost
3761 : );
3762 :
3763 : WINBASEAPI
3764 : int
3765 : WINAPI
3766 : GetThreadPriority(
3767 : __in HANDLE hThread
3768 : );
3769 :
3770 : WINBASEAPI
3771 : BOOL
3772 : WINAPI
3773 : GetThreadTimes(
3774 : __in HANDLE hThread,
3775 : __out LPFILETIME lpCreationTime,
3776 : __out LPFILETIME lpExitTime,
3777 : __out LPFILETIME lpKernelTime,
3778 : __out LPFILETIME lpUserTime
3779 : );
3780 :
3781 : #if _WIN32_WINNT >= 0x0501
3782 :
3783 : WINBASEAPI
3784 : BOOL
3785 : WINAPI
3786 : GetThreadIOPendingFlag(
3787 : __in HANDLE hThread,
3788 : __out PBOOL lpIOIsPending
3789 : );
3790 :
3791 : #endif // (_WIN32_WINNT >= 0x0501)
3792 :
3793 : WINBASEAPI
3794 : DECLSPEC_NORETURN
3795 : VOID
3796 : WINAPI
3797 : ExitThread(
3798 : __in DWORD dwExitCode
3799 : );
3800 :
3801 : WINBASEAPI
3802 : BOOL
3803 : WINAPI
3804 : TerminateThread(
3805 : __in HANDLE hThread,
3806 : __in DWORD dwExitCode
3807 : );
3808 :
3809 : WINBASEAPI
3810 : BOOL
3811 : WINAPI
3812 : GetExitCodeThread(
3813 : __in HANDLE hThread,
3814 : __out LPDWORD lpExitCode
3815 : );
3816 :
3817 : WINBASEAPI
3818 : BOOL
3819 : WINAPI
3820 : GetThreadSelectorEntry(
3821 : __in HANDLE hThread,
3822 : __in DWORD dwSelector,
3823 : __out LPLDT_ENTRY lpSelectorEntry
3824 : );
3825 :
3826 : WINBASEAPI
3827 : EXECUTION_STATE
3828 : WINAPI
3829 : SetThreadExecutionState(
3830 : __in EXECUTION_STATE esFlags
3831 : );
3832 :
3833 : #ifdef _M_CEE_PURE
3834 : #define GetLastError System::Runtime::InteropServices::Marshal::GetLastWin32Error
3835 : #else
3836 : WINBASEAPI
3837 : __checkReturn
3838 : DWORD
3839 : WINAPI
3840 : GetLastError(
3841 : VOID
3842 : );
3843 : #endif
3844 :
3845 : WINBASEAPI
3846 : VOID
3847 : WINAPI
3848 : SetLastError(
3849 : __in DWORD dwErrCode
3850 : );
3851 :
3852 : #if !defined(RC_INVOKED) // RC warns because "WINBASE_DECLARE_RESTORE_LAST_ERROR" is a bit long.
3853 : //#if _WIN32_WINNT >= 0x0501 || defined(WINBASE_DECLARE_RESTORE_LAST_ERROR)
3854 : #if defined(WINBASE_DECLARE_RESTORE_LAST_ERROR)
3855 :
3856 : WINBASEAPI
3857 : VOID
3858 : WINAPI
3859 : RestoreLastError(
3860 : __in DWORD dwErrCode
3861 : );
3862 :
3863 : typedef VOID (WINAPI* PRESTORE_LAST_ERROR)(DWORD);
3864 : #define RESTORE_LAST_ERROR_NAME_A "RestoreLastError"
3865 : #define RESTORE_LAST_ERROR_NAME_W L"RestoreLastError"
3866 : #define RESTORE_LAST_ERROR_NAME TEXT("RestoreLastError")
3867 :
3868 : #endif
3869 : #endif
3870 :
3871 : #define HasOverlappedIoCompleted(lpOverlapped) (((DWORD)(lpOverlapped)->Internal) != STATUS_PENDING)
3872 :
3873 : WINBASEAPI
3874 : BOOL
3875 : WINAPI
3876 : GetOverlappedResult(
3877 : __in HANDLE hFile,
3878 : __in LPOVERLAPPED lpOverlapped,
3879 : __out LPDWORD lpNumberOfBytesTransferred,
3880 : __in BOOL bWait
3881 : );
3882 :
3883 : WINBASEAPI
3884 : __out_opt
3885 : HANDLE
3886 : WINAPI
3887 : CreateIoCompletionPort(
3888 : __in HANDLE FileHandle,
3889 : __in_opt HANDLE ExistingCompletionPort,
3890 : __in ULONG_PTR CompletionKey,
3891 : __in DWORD NumberOfConcurrentThreads
3892 : );
3893 :
3894 : WINBASEAPI
3895 : BOOL
3896 : WINAPI
3897 : GetQueuedCompletionStatus(
3898 : __in HANDLE CompletionPort,
3899 : __out LPDWORD lpNumberOfBytesTransferred,
3900 : __out PULONG_PTR lpCompletionKey,
3901 : __out LPOVERLAPPED *lpOverlapped,
3902 : __in DWORD dwMilliseconds
3903 : );
3904 :
3905 : #if (_WIN32_WINNT >= 0x0600)
3906 :
3907 : WINBASEAPI
3908 : BOOL
3909 : WINAPI
3910 : GetQueuedCompletionStatusEx(
3911 : __in HANDLE CompletionPort,
3912 : __out_ecount_part(ulCount, *ulNumEntriesRemoved) LPOVERLAPPED_ENTRY lpCompletionPortEntries,
3913 : __in ULONG ulCount,
3914 : __out PULONG ulNumEntriesRemoved,
3915 : __in DWORD dwMilliseconds,
3916 : __in BOOL fAlertable
3917 : );
3918 :
3919 : #endif // _WIN32_WINNT >= 0x0600
3920 :
3921 : WINBASEAPI
3922 : BOOL
3923 : WINAPI
3924 : PostQueuedCompletionStatus(
3925 : __in HANDLE CompletionPort,
3926 : __in DWORD dwNumberOfBytesTransferred,
3927 : __in ULONG_PTR dwCompletionKey,
3928 : __in_opt LPOVERLAPPED lpOverlapped
3929 : );
3930 :
3931 : #if (_WIN32_WINNT >= 0x0600)
3932 :
3933 : //
3934 : // The following flags allows an application to change
3935 : // the semantics of IO completion notification.
3936 : //
3937 :
3938 : //
3939 : // Don't queue an entry to an associated completion port if returning success
3940 : // synchronously.
3941 : //
3942 : #define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1
3943 :
3944 : //
3945 : // Don't set the file handle event on IO completion.
3946 : //
3947 : #define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
3948 :
3949 : WINBASEAPI
3950 : BOOL
3951 : WINAPI
3952 : SetFileCompletionNotificationModes(
3953 : __in HANDLE FileHandle,
3954 : __in UCHAR Flags
3955 : );
3956 :
3957 : WINBASEAPI
3958 : BOOL
3959 : WINAPI
3960 : SetFileIoOverlappedRange(
3961 : __in HANDLE FileHandle,
3962 : __in PUCHAR OverlappedRangeStart,
3963 : __in ULONG Length
3964 : );
3965 :
3966 : #endif // _WIN32_WINNT >= 0x0600
3967 :
3968 : #define SEM_FAILCRITICALERRORS 0x0001
3969 : #define SEM_NOGPFAULTERRORBOX 0x0002
3970 : #define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
3971 : #define SEM_NOOPENFILEERRORBOX 0x8000
3972 :
3973 : WINBASEAPI
3974 : UINT
3975 : WINAPI
3976 : GetErrorMode(
3977 : VOID
3978 : );
3979 :
3980 : WINBASEAPI
3981 : UINT
3982 : WINAPI
3983 : SetErrorMode(
3984 : __in UINT uMode
3985 : );
3986 :
3987 : WINBASEAPI
3988 : BOOL
3989 : WINAPI
3990 : ReadProcessMemory(
3991 : __in HANDLE hProcess,
3992 : __in LPCVOID lpBaseAddress,
3993 : __out_bcount_part(nSize, *lpNumberOfBytesRead) LPVOID lpBuffer,
3994 : __in SIZE_T nSize,
3995 : __out_opt SIZE_T * lpNumberOfBytesRead
3996 : );
3997 :
3998 : WINBASEAPI
3999 : BOOL
4000 : WINAPI
4001 : WriteProcessMemory(
4002 : __in HANDLE hProcess,
4003 : __in LPVOID lpBaseAddress,
4004 : __in_bcount(nSize) LPCVOID lpBuffer,
4005 : __in SIZE_T nSize,
4006 : __out_opt SIZE_T * lpNumberOfBytesWritten
4007 : );
4008 :
4009 : #if !defined(MIDL_PASS)
4010 : WINBASEAPI
4011 : BOOL
4012 : WINAPI
4013 : GetThreadContext(
4014 : __in HANDLE hThread,
4015 : __inout LPCONTEXT lpContext
4016 : );
4017 :
4018 : WINBASEAPI
4019 : BOOL
4020 : WINAPI
4021 : SetThreadContext(
4022 : __in HANDLE hThread,
4023 : __in CONST CONTEXT *lpContext
4024 : );
4025 :
4026 : WINBASEAPI
4027 : BOOL
4028 : WINAPI
4029 : Wow64GetThreadContext(
4030 : __in HANDLE hThread,
4031 : __inout PWOW64_CONTEXT lpContext
4032 : );
4033 :
4034 : WINBASEAPI
4035 : BOOL
4036 : WINAPI
4037 : Wow64SetThreadContext(
4038 : __in HANDLE hThread,
4039 : __in CONST WOW64_CONTEXT *lpContext
4040 : );
4041 :
4042 : #endif
4043 :
4044 : WINBASEAPI
4045 : DWORD
4046 : WINAPI
4047 : SuspendThread(
4048 : __in HANDLE hThread
4049 : );
4050 :
4051 : WINBASEAPI
4052 : DWORD
4053 : WINAPI
4054 : Wow64SuspendThread(
4055 : __in HANDLE hThread
4056 : );
4057 :
4058 : WINBASEAPI
4059 : DWORD
4060 : WINAPI
4061 : ResumeThread(
4062 : __in HANDLE hThread
4063 : );
4064 :
4065 :
4066 : #if(_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
4067 :
4068 : typedef
4069 : VOID
4070 : (APIENTRY *PAPCFUNC)(
4071 : __in ULONG_PTR dwParam
4072 : );
4073 :
4074 : WINBASEAPI
4075 : DWORD
4076 : WINAPI
4077 : QueueUserAPC(
4078 : __in PAPCFUNC pfnAPC,
4079 : __in HANDLE hThread,
4080 : __in ULONG_PTR dwData
4081 : );
4082 :
4083 : #endif /* _WIN32_WINNT >= 0x0400 || _WIN32_WINDOWS > 0x0400 */
4084 :
4085 : #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
4086 : WINBASEAPI
4087 : BOOL
4088 : WINAPI
4089 : IsDebuggerPresent(
4090 : VOID
4091 : );
4092 : #endif
4093 :
4094 : #if _WIN32_WINNT >= 0x0501
4095 :
4096 : WINBASEAPI
4097 : BOOL
4098 : WINAPI
4099 : CheckRemoteDebuggerPresent(
4100 : __in HANDLE hProcess,
4101 : __out PBOOL pbDebuggerPresent
4102 : );
4103 :
4104 : #endif // (_WIN32_WINNT >= 0x0501)
4105 :
4106 : WINBASEAPI
4107 : VOID
4108 : WINAPI
4109 : DebugBreak(
4110 : VOID
4111 : );
4112 :
4113 : WINBASEAPI
4114 : BOOL
4115 : WINAPI
4116 : WaitForDebugEvent(
4117 : __in LPDEBUG_EVENT lpDebugEvent,
4118 : __in DWORD dwMilliseconds
4119 : );
4120 :
4121 : WINBASEAPI
4122 : BOOL
4123 : WINAPI
4124 : ContinueDebugEvent(
4125 : __in DWORD dwProcessId,
4126 : __in DWORD dwThreadId,
4127 : __in DWORD dwContinueStatus
4128 : );
4129 :
4130 : WINBASEAPI
4131 : BOOL
4132 : WINAPI
4133 : DebugActiveProcess(
4134 : __in DWORD dwProcessId
4135 : );
4136 :
4137 : WINBASEAPI
4138 : BOOL
4139 : WINAPI
4140 : DebugActiveProcessStop(
4141 : __in DWORD dwProcessId
4142 : );
4143 :
4144 : WINBASEAPI
4145 : BOOL
4146 : WINAPI
4147 : DebugSetProcessKillOnExit(
4148 : __in BOOL KillOnExit
4149 : );
4150 :
4151 : WINBASEAPI
4152 : BOOL
4153 : WINAPI
4154 : DebugBreakProcess (
4155 : __in HANDLE Process
4156 : );
4157 :
4158 : WINBASEAPI
4159 : VOID
4160 : WINAPI
4161 : InitializeCriticalSection(
4162 : __out LPCRITICAL_SECTION lpCriticalSection
4163 : );
4164 :
4165 : WINBASEAPI
4166 : VOID
4167 : WINAPI
4168 : EnterCriticalSection(
4169 : __inout LPCRITICAL_SECTION lpCriticalSection
4170 : );
4171 :
4172 : WINBASEAPI
4173 : VOID
4174 : WINAPI
4175 : LeaveCriticalSection(
4176 : __inout LPCRITICAL_SECTION lpCriticalSection
4177 : );
4178 :
4179 : #if (_WIN32_WINNT >= 0x0403)
4180 : #define CRITICAL_SECTION_NO_DEBUG_INFO RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO
4181 :
4182 : WINBASEAPI
4183 : BOOL
4184 : WINAPI
4185 : InitializeCriticalSectionAndSpinCount(
4186 : __out LPCRITICAL_SECTION lpCriticalSection,
4187 : __in DWORD dwSpinCount
4188 : );
4189 :
4190 : WINBASEAPI
4191 : BOOL
4192 : WINAPI
4193 : InitializeCriticalSectionEx(
4194 : __out LPCRITICAL_SECTION lpCriticalSection,
4195 : __in DWORD dwSpinCount,
4196 : __in DWORD Flags
4197 : );
4198 :
4199 : WINBASEAPI
4200 : DWORD
4201 : WINAPI
4202 : SetCriticalSectionSpinCount(
4203 : __inout LPCRITICAL_SECTION lpCriticalSection,
4204 : __in DWORD dwSpinCount
4205 : );
4206 : #endif
4207 :
4208 : #if(_WIN32_WINNT >= 0x0400)
4209 : WINBASEAPI
4210 : BOOL
4211 : WINAPI
4212 : TryEnterCriticalSection(
4213 : __inout LPCRITICAL_SECTION lpCriticalSection
4214 : );
4215 : #endif /* _WIN32_WINNT >= 0x0400 */
4216 :
4217 : WINBASEAPI
4218 : VOID
4219 : WINAPI
4220 : DeleteCriticalSection(
4221 : __inout LPCRITICAL_SECTION lpCriticalSection
4222 : );
4223 :
4224 : WINBASEAPI
4225 : BOOL
4226 : WINAPI
4227 : SetEvent(
4228 : __in HANDLE hEvent
4229 : );
4230 :
4231 : WINBASEAPI
4232 : BOOL
4233 : WINAPI
4234 : ResetEvent(
4235 : __in HANDLE hEvent
4236 : );
4237 :
4238 : WINBASEAPI
4239 : BOOL
4240 : WINAPI
4241 : PulseEvent(
4242 : __in HANDLE hEvent
4243 : );
4244 :
4245 : WINBASEAPI
4246 : BOOL
4247 : WINAPI
4248 : ReleaseSemaphore(
4249 : __in HANDLE hSemaphore,
4250 : __in LONG lReleaseCount,
4251 : __out_opt LPLONG lpPreviousCount
4252 : );
4253 :
4254 : WINBASEAPI
4255 : BOOL
4256 : WINAPI
4257 : ReleaseMutex(
4258 : __in HANDLE hMutex
4259 : );
4260 :
4261 : WINBASEAPI
4262 : DWORD
4263 : WINAPI
4264 : WaitForSingleObject(
4265 : __in HANDLE hHandle,
4266 : __in DWORD dwMilliseconds
4267 : );
4268 :
4269 : WINBASEAPI
4270 : DWORD
4271 : WINAPI
4272 : WaitForMultipleObjects(
4273 : __in DWORD nCount,
4274 : __in_ecount(nCount) CONST HANDLE *lpHandles,
4275 : __in BOOL bWaitAll,
4276 : __in DWORD dwMilliseconds
4277 : );
4278 :
4279 : WINBASEAPI
4280 : VOID
4281 : WINAPI
4282 : Sleep(
4283 : __in DWORD dwMilliseconds
4284 : );
4285 :
4286 : WINBASEAPI
4287 : __out_opt
4288 : HGLOBAL
4289 : WINAPI
4290 : LoadResource(
4291 : __in_opt HMODULE hModule,
4292 : __in HRSRC hResInfo
4293 : );
4294 :
4295 : WINBASEAPI
4296 : DWORD
4297 : WINAPI
4298 : SizeofResource(
4299 : __in_opt HMODULE hModule,
4300 : __in HRSRC hResInfo
4301 : );
4302 :
4303 :
4304 : WINBASEAPI
4305 : ATOM
4306 : WINAPI
4307 : GlobalDeleteAtom(
4308 : __in ATOM nAtom
4309 : );
4310 :
4311 : WINBASEAPI
4312 : BOOL
4313 : WINAPI
4314 : InitAtomTable(
4315 : __in DWORD nSize
4316 : );
4317 :
4318 : WINBASEAPI
4319 : ATOM
4320 : WINAPI
4321 : DeleteAtom(
4322 : __in ATOM nAtom
4323 : );
4324 :
4325 : WINBASEAPI
4326 : UINT
4327 : WINAPI
4328 : SetHandleCount(
4329 : __in UINT uNumber
4330 : );
4331 :
4332 : WINBASEAPI
4333 : DWORD
4334 : WINAPI
4335 : GetLogicalDrives(
4336 : VOID
4337 : );
4338 :
4339 : WINBASEAPI
4340 : BOOL
4341 : WINAPI
4342 : LockFile(
4343 : __in HANDLE hFile,
4344 : __in DWORD dwFileOffsetLow,
4345 : __in DWORD dwFileOffsetHigh,
4346 : __in DWORD nNumberOfBytesToLockLow,
4347 : __in DWORD nNumberOfBytesToLockHigh
4348 : );
4349 :
4350 : WINBASEAPI
4351 : BOOL
4352 : WINAPI
4353 : UnlockFile(
4354 : __in HANDLE hFile,
4355 : __in DWORD dwFileOffsetLow,
4356 : __in DWORD dwFileOffsetHigh,
4357 : __in DWORD nNumberOfBytesToUnlockLow,
4358 : __in DWORD nNumberOfBytesToUnlockHigh
4359 : );
4360 :
4361 : WINBASEAPI
4362 : BOOL
4363 : WINAPI
4364 : LockFileEx(
4365 : __in HANDLE hFile,
4366 : __in DWORD dwFlags,
4367 : __reserved DWORD dwReserved,
4368 : __in DWORD nNumberOfBytesToLockLow,
4369 : __in DWORD nNumberOfBytesToLockHigh,
4370 : __inout LPOVERLAPPED lpOverlapped
4371 : );
4372 :
4373 : #define LOCKFILE_FAIL_IMMEDIATELY 0x00000001
4374 : #define LOCKFILE_EXCLUSIVE_LOCK 0x00000002
4375 :
4376 : WINBASEAPI
4377 : BOOL
4378 : WINAPI
4379 : UnlockFileEx(
4380 : __in HANDLE hFile,
4381 : __reserved DWORD dwReserved,
4382 : __in DWORD nNumberOfBytesToUnlockLow,
4383 : __in DWORD nNumberOfBytesToUnlockHigh,
4384 : __inout LPOVERLAPPED lpOverlapped
4385 : );
4386 :
4387 : typedef struct _BY_HANDLE_FILE_INFORMATION {
4388 : DWORD dwFileAttributes;
4389 : FILETIME ftCreationTime;
4390 : FILETIME ftLastAccessTime;
4391 : FILETIME ftLastWriteTime;
4392 : DWORD dwVolumeSerialNumber;
4393 : DWORD nFileSizeHigh;
4394 : DWORD nFileSizeLow;
4395 : DWORD nNumberOfLinks;
4396 : DWORD nFileIndexHigh;
4397 : DWORD nFileIndexLow;
4398 : } BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_INFORMATION;
4399 :
4400 : WINBASEAPI
4401 : BOOL
4402 : WINAPI
4403 : GetFileInformationByHandle(
4404 : __in HANDLE hFile,
4405 : __out LPBY_HANDLE_FILE_INFORMATION lpFileInformation
4406 : );
4407 :
4408 : WINBASEAPI
4409 : DWORD
4410 : WINAPI
4411 : GetFileType(
4412 : __in HANDLE hFile
4413 : );
4414 :
4415 : WINBASEAPI
4416 : DWORD
4417 : WINAPI
4418 : GetFileSize(
4419 : __in HANDLE hFile,
4420 : __out_opt LPDWORD lpFileSizeHigh
4421 : );
4422 :
4423 : WINBASEAPI
4424 : BOOL
4425 : WINAPI
4426 : GetFileSizeEx(
4427 : __in HANDLE hFile,
4428 : __out PLARGE_INTEGER lpFileSize
4429 : );
4430 :
4431 :
4432 : WINBASEAPI
4433 : HANDLE
4434 : WINAPI
4435 : GetStdHandle(
4436 : __in DWORD nStdHandle
4437 : );
4438 :
4439 : WINBASEAPI
4440 : BOOL
4441 : WINAPI
4442 : SetStdHandle(
4443 : __in DWORD nStdHandle,
4444 : __in HANDLE hHandle
4445 : );
4446 :
4447 : #if (_WIN32_WINNT >= 0x0600)
4448 :
4449 : WINBASEAPI
4450 : BOOL
4451 : WINAPI
4452 : SetStdHandleEx(
4453 : __in DWORD nStdHandle,
4454 : __in HANDLE hHandle,
4455 : __out_opt PHANDLE phPrevValue
4456 : );
4457 :
4458 : #endif // _WIN32_WINNT >= 0x0600
4459 :
4460 : WINBASEAPI
4461 : BOOL
4462 : WINAPI
4463 : WriteFile(
4464 : __in HANDLE hFile,
4465 : __in_bcount_opt(nNumberOfBytesToWrite) LPCVOID lpBuffer,
4466 : __in DWORD nNumberOfBytesToWrite,
4467 : __out_opt LPDWORD lpNumberOfBytesWritten,
4468 : __inout_opt LPOVERLAPPED lpOverlapped
4469 : );
4470 :
4471 : WINBASEAPI
4472 : BOOL
4473 : WINAPI
4474 : ReadFile(
4475 : __in HANDLE hFile,
4476 : __out_bcount_part_opt(nNumberOfBytesToRead, *lpNumberOfBytesRead) __out_data_source(FILE) LPVOID lpBuffer,
4477 : __in DWORD nNumberOfBytesToRead,
4478 : __out_opt LPDWORD lpNumberOfBytesRead,
4479 : __inout_opt LPOVERLAPPED lpOverlapped
4480 : );
4481 :
4482 : WINBASEAPI
4483 : BOOL
4484 : WINAPI
4485 : FlushFileBuffers(
4486 : __in HANDLE hFile
4487 : );
4488 :
4489 : WINBASEAPI
4490 : BOOL
4491 : WINAPI
4492 : DeviceIoControl(
4493 : __in HANDLE hDevice,
4494 : __in DWORD dwIoControlCode,
4495 : __in_bcount_opt(nInBufferSize) LPVOID lpInBuffer,
4496 : __in DWORD nInBufferSize,
4497 : __out_bcount_part_opt(nOutBufferSize, *lpBytesReturned) LPVOID lpOutBuffer,
4498 : __in DWORD nOutBufferSize,
4499 : __out_opt LPDWORD lpBytesReturned,
4500 : __inout_opt LPOVERLAPPED lpOverlapped
4501 : );
4502 :
4503 : WINBASEAPI
4504 : BOOL
4505 : WINAPI
4506 : RequestDeviceWakeup(
4507 : __in HANDLE hDevice
4508 : );
4509 :
4510 : WINBASEAPI
4511 : BOOL
4512 : WINAPI
4513 : CancelDeviceWakeupRequest(
4514 : __in HANDLE hDevice
4515 : );
4516 :
4517 : WINBASEAPI
4518 : BOOL
4519 : WINAPI
4520 : GetDevicePowerState(
4521 : __in HANDLE hDevice,
4522 : __out BOOL *pfOn
4523 : );
4524 :
4525 : WINBASEAPI
4526 : BOOL
4527 : WINAPI
4528 : SetMessageWaitingIndicator(
4529 : __in HANDLE hMsgIndicator,
4530 : __in ULONG ulMsgCount
4531 : );
4532 :
4533 : WINBASEAPI
4534 : BOOL
4535 : WINAPI
4536 : SetEndOfFile(
4537 : __in HANDLE hFile
4538 : );
4539 :
4540 : WINBASEAPI
4541 : DWORD
4542 : WINAPI
4543 : SetFilePointer(
4544 : __in HANDLE hFile,
4545 : __in LONG lDistanceToMove,
4546 : __inout_opt PLONG lpDistanceToMoveHigh,
4547 : __in DWORD dwMoveMethod
4548 : );
4549 :
4550 : WINBASEAPI
4551 : BOOL
4552 : WINAPI
4553 : SetFilePointerEx(
4554 : __in HANDLE hFile,
4555 : __in LARGE_INTEGER liDistanceToMove,
4556 : __out_opt PLARGE_INTEGER lpNewFilePointer,
4557 : __in DWORD dwMoveMethod
4558 : );
4559 :
4560 : WINBASEAPI
4561 : BOOL
4562 : WINAPI
4563 : FindClose(
4564 : __inout HANDLE hFindFile
4565 : );
4566 :
4567 : WINBASEAPI
4568 : BOOL
4569 : WINAPI
4570 : GetFileTime(
4571 : __in HANDLE hFile,
4572 : __out_opt LPFILETIME lpCreationTime,
4573 : __out_opt LPFILETIME lpLastAccessTime,
4574 : __out_opt LPFILETIME lpLastWriteTime
4575 : );
4576 :
4577 : WINBASEAPI
4578 : BOOL
4579 : WINAPI
4580 : SetFileTime(
4581 : __in HANDLE hFile,
4582 : __in_opt CONST FILETIME *lpCreationTime,
4583 : __in_opt CONST FILETIME *lpLastAccessTime,
4584 : __in_opt CONST FILETIME *lpLastWriteTime
4585 : );
4586 :
4587 :
4588 : #if _WIN32_WINNT >= 0x0501
4589 :
4590 : WINBASEAPI
4591 : BOOL
4592 : WINAPI
4593 : SetFileValidData(
4594 : __in HANDLE hFile,
4595 : __in LONGLONG ValidDataLength
4596 : );
4597 :
4598 : #endif // (_WIN32_WINNT >= 0x0501)
4599 :
4600 :
4601 : WINBASEAPI
4602 : BOOL
4603 : WINAPI
4604 : SetFileShortNameA(
4605 : __in HANDLE hFile,
4606 : __in LPCSTR lpShortName
4607 : );
4608 : WINBASEAPI
4609 : BOOL
4610 : WINAPI
4611 : SetFileShortNameW(
4612 : __in HANDLE hFile,
4613 : __in LPCWSTR lpShortName
4614 : );
4615 : #ifdef UNICODE
4616 : #define SetFileShortName SetFileShortNameW
4617 : #else
4618 : #define SetFileShortName SetFileShortNameA
4619 : #endif // !UNICODE
4620 :
4621 : WINBASEAPI
4622 : BOOL
4623 : WINAPI
4624 : CloseHandle(
4625 : __in HANDLE hObject
4626 : );
4627 :
4628 : WINBASEAPI
4629 : BOOL
4630 : WINAPI
4631 : DuplicateHandle(
4632 : __in HANDLE hSourceProcessHandle,
4633 : __in HANDLE hSourceHandle,
4634 : __in HANDLE hTargetProcessHandle,
4635 : __deref_out LPHANDLE lpTargetHandle,
4636 : __in DWORD dwDesiredAccess,
4637 : __in BOOL bInheritHandle,
4638 : __in DWORD dwOptions
4639 : );
4640 :
4641 : WINBASEAPI
4642 : BOOL
4643 : WINAPI
4644 : GetHandleInformation(
4645 : __in HANDLE hObject,
4646 : __out LPDWORD lpdwFlags
4647 : );
4648 :
4649 : WINBASEAPI
4650 : BOOL
4651 : WINAPI
4652 : SetHandleInformation(
4653 : __in HANDLE hObject,
4654 : __in DWORD dwMask,
4655 : __in DWORD dwFlags
4656 : );
4657 :
4658 : #define HANDLE_FLAG_INHERIT 0x00000001
4659 : #define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x00000002
4660 :
4661 : #define HINSTANCE_ERROR 32
4662 :
4663 : WINBASEAPI
4664 : DWORD
4665 : WINAPI
4666 : LoadModule(
4667 : __in LPCSTR lpModuleName,
4668 : __in LPVOID lpParameterBlock
4669 : );
4670 :
4671 :
4672 : WINBASEAPI
4673 : UINT
4674 : WINAPI
4675 : WinExec(
4676 : __in LPCSTR lpCmdLine,
4677 : __in UINT uCmdShow
4678 : );
4679 :
4680 : WINBASEAPI
4681 : BOOL
4682 : WINAPI
4683 : ClearCommBreak(
4684 : __in HANDLE hFile
4685 : );
4686 :
4687 : WINBASEAPI
4688 : BOOL
4689 : WINAPI
4690 : ClearCommError(
4691 : __in HANDLE hFile,
4692 : __out_opt LPDWORD lpErrors,
4693 : __out_opt LPCOMSTAT lpStat
4694 : );
4695 :
4696 : WINBASEAPI
4697 : BOOL
4698 : WINAPI
4699 : SetupComm(
4700 : __in HANDLE hFile,
4701 : __in DWORD dwInQueue,
4702 : __in DWORD dwOutQueue
4703 : );
4704 :
4705 : WINBASEAPI
4706 : BOOL
4707 : WINAPI
4708 : EscapeCommFunction(
4709 : __in HANDLE hFile,
4710 : __in DWORD dwFunc
4711 : );
4712 :
4713 : WINBASEAPI
4714 : __success(return == TRUE)
4715 : BOOL
4716 : WINAPI
4717 : GetCommConfig(
4718 : __in HANDLE hCommDev,
4719 : __out_bcount_opt(*lpdwSize) LPCOMMCONFIG lpCC,
4720 : __inout LPDWORD lpdwSize
4721 : );
4722 :
4723 : WINBASEAPI
4724 : BOOL
4725 : WINAPI
4726 : GetCommMask(
4727 : __in HANDLE hFile,
4728 : __out LPDWORD lpEvtMask
4729 : );
4730 :
4731 : WINBASEAPI
4732 : BOOL
4733 : WINAPI
4734 : GetCommProperties(
4735 : __in HANDLE hFile,
4736 : __inout LPCOMMPROP lpCommProp
4737 : );
4738 :
4739 : WINBASEAPI
4740 : BOOL
4741 : WINAPI
4742 : GetCommModemStatus(
4743 : __in HANDLE hFile,
4744 : __out LPDWORD lpModemStat
4745 : );
4746 :
4747 : WINBASEAPI
4748 : BOOL
4749 : WINAPI
4750 : GetCommState(
4751 : __in HANDLE hFile,
4752 : __out LPDCB lpDCB
4753 : );
4754 :
4755 : WINBASEAPI
4756 : BOOL
4757 : WINAPI
4758 : GetCommTimeouts(
4759 : __in HANDLE hFile,
4760 : __out LPCOMMTIMEOUTS lpCommTimeouts
4761 : );
4762 :
4763 : WINBASEAPI
4764 : BOOL
4765 : WINAPI
4766 : PurgeComm(
4767 : __in HANDLE hFile,
4768 : __in DWORD dwFlags
4769 : );
4770 :
4771 : WINBASEAPI
4772 : BOOL
4773 : WINAPI
4774 : SetCommBreak(
4775 : __in HANDLE hFile
4776 : );
4777 :
4778 : WINBASEAPI
4779 : BOOL
4780 : WINAPI
4781 : SetCommConfig(
4782 : __in HANDLE hCommDev,
4783 : __in_bcount(dwSize) LPCOMMCONFIG lpCC,
4784 : __in DWORD dwSize
4785 : );
4786 :
4787 : WINBASEAPI
4788 : BOOL
4789 : WINAPI
4790 : SetCommMask(
4791 : __in HANDLE hFile,
4792 : __in DWORD dwEvtMask
4793 : );
4794 :
4795 : WINBASEAPI
4796 : BOOL
4797 : WINAPI
4798 : SetCommState(
4799 : __in HANDLE hFile,
4800 : __in LPDCB lpDCB
4801 : );
4802 :
4803 : WINBASEAPI
4804 : BOOL
4805 : WINAPI
4806 : SetCommTimeouts(
4807 : __in HANDLE hFile,
4808 : __in LPCOMMTIMEOUTS lpCommTimeouts
4809 : );
4810 :
4811 : WINBASEAPI
4812 : BOOL
4813 : WINAPI
4814 : TransmitCommChar(
4815 : __in HANDLE hFile,
4816 : __in char cChar
4817 : );
4818 :
4819 : WINBASEAPI
4820 : BOOL
4821 : WINAPI
4822 : WaitCommEvent(
4823 : __in HANDLE hFile,
4824 : __inout LPDWORD lpEvtMask,
4825 : __inout_opt LPOVERLAPPED lpOverlapped
4826 : );
4827 :
4828 :
4829 : WINBASEAPI
4830 : DWORD
4831 : WINAPI
4832 : SetTapePosition(
4833 : __in HANDLE hDevice,
4834 : __in DWORD dwPositionMethod,
4835 : __in DWORD dwPartition,
4836 : __in DWORD dwOffsetLow,
4837 : __in DWORD dwOffsetHigh,
4838 : __in BOOL bImmediate
4839 : );
4840 :
4841 : WINBASEAPI
4842 : DWORD
4843 : WINAPI
4844 : GetTapePosition(
4845 : __in HANDLE hDevice,
4846 : __in DWORD dwPositionType,
4847 : __out LPDWORD lpdwPartition,
4848 : __out LPDWORD lpdwOffsetLow,
4849 : __out LPDWORD lpdwOffsetHigh
4850 : );
4851 :
4852 : WINBASEAPI
4853 : DWORD
4854 : WINAPI
4855 : PrepareTape(
4856 : __in HANDLE hDevice,
4857 : __in DWORD dwOperation,
4858 : __in BOOL bImmediate
4859 : );
4860 :
4861 : WINBASEAPI
4862 : DWORD
4863 : WINAPI
4864 : EraseTape(
4865 : __in HANDLE hDevice,
4866 : __in DWORD dwEraseType,
4867 : __in BOOL bImmediate
4868 : );
4869 :
4870 : WINBASEAPI
4871 : DWORD
4872 : WINAPI
4873 : CreateTapePartition(
4874 : __in HANDLE hDevice,
4875 : __in DWORD dwPartitionMethod,
4876 : __in DWORD dwCount,
4877 : __in DWORD dwSize
4878 : );
4879 :
4880 : WINBASEAPI
4881 : DWORD
4882 : WINAPI
4883 : WriteTapemark(
4884 : __in HANDLE hDevice,
4885 : __in DWORD dwTapemarkType,
4886 : __in DWORD dwTapemarkCount,
4887 : __in BOOL bImmediate
4888 : );
4889 :
4890 : WINBASEAPI
4891 : DWORD
4892 : WINAPI
4893 : GetTapeStatus(
4894 : __in HANDLE hDevice
4895 : );
4896 :
4897 : WINBASEAPI
4898 : DWORD
4899 : WINAPI
4900 : GetTapeParameters(
4901 : __in HANDLE hDevice,
4902 : __in DWORD dwOperation,
4903 : __inout LPDWORD lpdwSize,
4904 : __out_bcount(*lpdwSize) LPVOID lpTapeInformation
4905 : );
4906 :
4907 : #define GET_TAPE_MEDIA_INFORMATION 0
4908 : #define GET_TAPE_DRIVE_INFORMATION 1
4909 :
4910 : WINBASEAPI
4911 : DWORD
4912 : WINAPI
4913 : SetTapeParameters(
4914 : __in HANDLE hDevice,
4915 : __in DWORD dwOperation,
4916 : __in LPVOID lpTapeInformation
4917 : );
4918 :
4919 : #define SET_TAPE_MEDIA_INFORMATION 0
4920 : #define SET_TAPE_DRIVE_INFORMATION 1
4921 :
4922 : WINBASEAPI
4923 : BOOL
4924 : WINAPI
4925 : Beep(
4926 : __in DWORD dwFreq,
4927 : __in DWORD dwDuration
4928 : );
4929 :
4930 : WINBASEAPI
4931 : int
4932 : WINAPI
4933 : MulDiv(
4934 : __in int nNumber,
4935 : __in int nNumerator,
4936 : __in int nDenominator
4937 : );
4938 :
4939 : WINBASEAPI
4940 : VOID
4941 : WINAPI
4942 : GetSystemTime(
4943 : __out LPSYSTEMTIME lpSystemTime
4944 : );
4945 :
4946 : WINBASEAPI
4947 : VOID
4948 : WINAPI
4949 : GetSystemTimeAsFileTime(
4950 : __out LPFILETIME lpSystemTimeAsFileTime
4951 : );
4952 :
4953 : WINBASEAPI
4954 : BOOL
4955 : WINAPI
4956 : SetSystemTime(
4957 : __in CONST SYSTEMTIME *lpSystemTime
4958 : );
4959 :
4960 : WINBASEAPI
4961 : VOID
4962 : WINAPI
4963 : GetLocalTime(
4964 : __out LPSYSTEMTIME lpSystemTime
4965 : );
4966 :
4967 : WINBASEAPI
4968 : BOOL
4969 : WINAPI
4970 : SetLocalTime(
4971 : __in CONST SYSTEMTIME *lpSystemTime
4972 : );
4973 :
4974 : WINBASEAPI
4975 : VOID
4976 : WINAPI
4977 : GetSystemInfo(
4978 : __out LPSYSTEM_INFO lpSystemInfo
4979 : );
4980 :
4981 : #if _WIN32_WINNT >= 0x0502
4982 :
4983 : WINBASEAPI
4984 : BOOL
4985 : WINAPI
4986 : SetSystemFileCacheSize (
4987 : __in SIZE_T MinimumFileCacheSize,
4988 : __in SIZE_T MaximumFileCacheSize,
4989 : __in DWORD Flags
4990 : );
4991 :
4992 : WINBASEAPI
4993 : BOOL
4994 : WINAPI
4995 : GetSystemFileCacheSize (
4996 : __out PSIZE_T lpMinimumFileCacheSize,
4997 : __out PSIZE_T lpMaximumFileCacheSize,
4998 : __out PDWORD lpFlags
4999 : );
5000 :
5001 : #endif // (_WIN32_WINNT >= 0x0502)
5002 :
5003 : #if _WIN32_WINNT >= 0x0501
5004 :
5005 : WINBASEAPI
5006 : BOOL
5007 : WINAPI
5008 : GetSystemRegistryQuota(
5009 : __out_opt PDWORD pdwQuotaAllowed,
5010 : __out_opt PDWORD pdwQuotaUsed
5011 : );
5012 :
5013 : BOOL
5014 : WINAPI
5015 : GetSystemTimes(
5016 : __out_opt LPFILETIME lpIdleTime,
5017 : __out_opt LPFILETIME lpKernelTime,
5018 : __out_opt LPFILETIME lpUserTime
5019 : );
5020 :
5021 : #endif // (_WIN32_WINNT >= 0x0501)
5022 :
5023 : #if _WIN32_WINNT >= 0x0501
5024 : WINBASEAPI
5025 : VOID
5026 : WINAPI
5027 : GetNativeSystemInfo(
5028 : __out LPSYSTEM_INFO lpSystemInfo
5029 : );
5030 : #endif
5031 :
5032 : WINBASEAPI
5033 : BOOL
5034 : WINAPI
5035 : IsProcessorFeaturePresent(
5036 : __in DWORD ProcessorFeature
5037 : );
5038 :
5039 : typedef struct _TIME_ZONE_INFORMATION {
5040 : LONG Bias;
5041 : WCHAR StandardName[ 32 ];
5042 : SYSTEMTIME StandardDate;
5043 : LONG StandardBias;
5044 : WCHAR DaylightName[ 32 ];
5045 : SYSTEMTIME DaylightDate;
5046 : LONG DaylightBias;
5047 : } TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
5048 :
5049 : typedef struct _TIME_DYNAMIC_ZONE_INFORMATION {
5050 : LONG Bias;
5051 : WCHAR StandardName[ 32 ];
5052 : SYSTEMTIME StandardDate;
5053 : LONG StandardBias;
5054 : WCHAR DaylightName[ 32 ];
5055 : SYSTEMTIME DaylightDate;
5056 : LONG DaylightBias;
5057 : WCHAR TimeZoneKeyName[ 128 ];
5058 : BOOLEAN DynamicDaylightTimeDisabled;
5059 : } DYNAMIC_TIME_ZONE_INFORMATION, *PDYNAMIC_TIME_ZONE_INFORMATION;
5060 :
5061 :
5062 : WINBASEAPI
5063 : BOOL
5064 : WINAPI
5065 : SystemTimeToTzSpecificLocalTime(
5066 : __in_opt CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation,
5067 : __in CONST SYSTEMTIME *lpUniversalTime,
5068 : __out LPSYSTEMTIME lpLocalTime
5069 : );
5070 :
5071 : WINBASEAPI
5072 : BOOL
5073 : WINAPI
5074 : TzSpecificLocalTimeToSystemTime(
5075 : __in_opt CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation,
5076 : __in CONST SYSTEMTIME *lpLocalTime,
5077 : __out LPSYSTEMTIME lpUniversalTime
5078 : );
5079 :
5080 : WINBASEAPI
5081 : DWORD
5082 : WINAPI
5083 : GetTimeZoneInformation(
5084 : __out LPTIME_ZONE_INFORMATION lpTimeZoneInformation
5085 : );
5086 :
5087 : WINBASEAPI
5088 : BOOL
5089 : WINAPI
5090 : SetTimeZoneInformation(
5091 : __in CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation
5092 : );
5093 :
5094 : WINBASEAPI
5095 : DWORD
5096 : WINAPI
5097 : GetDynamicTimeZoneInformation(
5098 : __out PDYNAMIC_TIME_ZONE_INFORMATION pTimeZoneInformation
5099 : );
5100 :
5101 : WINBASEAPI
5102 : BOOL
5103 : WINAPI
5104 : SetDynamicTimeZoneInformation(
5105 : __in CONST DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation
5106 : );
5107 :
5108 :
5109 :
5110 : //
5111 : // Routines to convert back and forth between system time and file time
5112 : //
5113 :
5114 : WINBASEAPI
5115 : BOOL
5116 : WINAPI
5117 : SystemTimeToFileTime(
5118 : __in CONST SYSTEMTIME *lpSystemTime,
5119 : __out LPFILETIME lpFileTime
5120 : );
5121 :
5122 : WINBASEAPI
5123 : BOOL
5124 : WINAPI
5125 : FileTimeToLocalFileTime(
5126 : __in CONST FILETIME *lpFileTime,
5127 : __out LPFILETIME lpLocalFileTime
5128 : );
5129 :
5130 : WINBASEAPI
5131 : BOOL
5132 : WINAPI
5133 : LocalFileTimeToFileTime(
5134 : __in CONST FILETIME *lpLocalFileTime,
5135 : __out LPFILETIME lpFileTime
5136 : );
5137 :
5138 : WINBASEAPI
5139 : BOOL
5140 : WINAPI
5141 : FileTimeToSystemTime(
5142 : __in CONST FILETIME *lpFileTime,
5143 : __out LPSYSTEMTIME lpSystemTime
5144 : );
5145 :
5146 : WINBASEAPI
5147 : LONG
5148 : WINAPI
5149 : CompareFileTime(
5150 : __in CONST FILETIME *lpFileTime1,
5151 : __in CONST FILETIME *lpFileTime2
5152 : );
5153 :
5154 : WINBASEAPI
5155 : BOOL
5156 : WINAPI
5157 : FileTimeToDosDateTime(
5158 : __in CONST FILETIME *lpFileTime,
5159 : __out LPWORD lpFatDate,
5160 : __out LPWORD lpFatTime
5161 : );
5162 :
5163 : WINBASEAPI
5164 : BOOL
5165 : WINAPI
5166 : DosDateTimeToFileTime(
5167 : __in WORD wFatDate,
5168 : __in WORD wFatTime,
5169 : __out LPFILETIME lpFileTime
5170 : );
5171 :
5172 : WINBASEAPI
5173 : DWORD
5174 : WINAPI
5175 : GetTickCount(
5176 : VOID
5177 : );
5178 :
5179 : WINBASEAPI
5180 : ULONGLONG
5181 : WINAPI
5182 : GetTickCount64(
5183 : VOID
5184 : );
5185 :
5186 : WINBASEAPI
5187 : BOOL
5188 : WINAPI
5189 : SetSystemTimeAdjustment(
5190 : __in DWORD dwTimeAdjustment,
5191 : __in BOOL bTimeAdjustmentDisabled
5192 : );
5193 :
5194 : WINBASEAPI
5195 : BOOL
5196 : WINAPI
5197 : GetSystemTimeAdjustment(
5198 : __out PDWORD lpTimeAdjustment,
5199 : __out PDWORD lpTimeIncrement,
5200 : __out PBOOL lpTimeAdjustmentDisabled
5201 : );
5202 :
5203 : #if !defined(MIDL_PASS)
5204 : WINBASEAPI
5205 : DWORD
5206 : WINAPI
5207 : FormatMessageA(
5208 : __in DWORD dwFlags,
5209 : __in_opt LPCVOID lpSource,
5210 : __in DWORD dwMessageId,
5211 : __in DWORD dwLanguageId,
5212 : __out LPSTR lpBuffer,
5213 : __in DWORD nSize,
5214 : __in_opt va_list *Arguments
5215 : );
5216 : WINBASEAPI
5217 : DWORD
5218 : WINAPI
5219 : FormatMessageW(
5220 : __in DWORD dwFlags,
5221 : __in_opt LPCVOID lpSource,
5222 : __in DWORD dwMessageId,
5223 : __in DWORD dwLanguageId,
5224 : __out LPWSTR lpBuffer,
5225 : __in DWORD nSize,
5226 : __in_opt va_list *Arguments
5227 : );
5228 : #ifdef UNICODE
5229 : #define FormatMessage FormatMessageW
5230 : #else
5231 : #define FormatMessage FormatMessageA
5232 : #endif // !UNICODE
5233 :
5234 : #if defined(_M_CEE)
5235 : #undef FormatMessage
5236 : __inline
5237 : DWORD
5238 : FormatMessage(
5239 : DWORD dwFlags,
5240 : LPCVOID lpSource,
5241 : DWORD dwMessageId,
5242 : DWORD dwLanguageId,
5243 : LPTSTR lpBuffer,
5244 : DWORD nSize,
5245 : va_list *Arguments
5246 : )
5247 : {
5248 : #ifdef UNICODE
5249 : return FormatMessageW(
5250 : #else
5251 : return FormatMessageA(
5252 : #endif
5253 : dwFlags,
5254 : lpSource,
5255 : dwMessageId,
5256 : dwLanguageId,
5257 : lpBuffer,
5258 : nSize,
5259 : Arguments
5260 : );
5261 : }
5262 : #endif /* _M_CEE */
5263 : #endif /* MIDL_PASS */
5264 :
5265 : #define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
5266 : #define FORMAT_MESSAGE_IGNORE_INSERTS 0x00000200
5267 : #define FORMAT_MESSAGE_FROM_STRING 0x00000400
5268 : #define FORMAT_MESSAGE_FROM_HMODULE 0x00000800
5269 : #define FORMAT_MESSAGE_FROM_SYSTEM 0x00001000
5270 : #define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x00002000
5271 : #define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF
5272 :
5273 :
5274 :
5275 : WINBASEAPI
5276 : BOOL
5277 : WINAPI
5278 : CreatePipe(
5279 : __out_ecount_full(1) PHANDLE hReadPipe,
5280 : __out_ecount_full(1) PHANDLE hWritePipe,
5281 : __in_opt LPSECURITY_ATTRIBUTES lpPipeAttributes,
5282 : __in DWORD nSize
5283 : );
5284 :
5285 : WINBASEAPI
5286 : BOOL
5287 : WINAPI
5288 : ConnectNamedPipe(
5289 : __in HANDLE hNamedPipe,
5290 : __inout_opt LPOVERLAPPED lpOverlapped
5291 : );
5292 :
5293 : WINBASEAPI
5294 : BOOL
5295 : WINAPI
5296 : DisconnectNamedPipe(
5297 : __in HANDLE hNamedPipe
5298 : );
5299 :
5300 : WINBASEAPI
5301 : BOOL
5302 : WINAPI
5303 : SetNamedPipeHandleState(
5304 : __in HANDLE hNamedPipe,
5305 : __in_opt LPDWORD lpMode,
5306 : __in_opt LPDWORD lpMaxCollectionCount,
5307 : __in_opt LPDWORD lpCollectDataTimeout
5308 : );
5309 :
5310 : WINBASEAPI
5311 : BOOL
5312 : WINAPI
5313 : GetNamedPipeInfo(
5314 : __in HANDLE hNamedPipe,
5315 : __out_opt LPDWORD lpFlags,
5316 : __out_opt LPDWORD lpOutBufferSize,
5317 : __out_opt LPDWORD lpInBufferSize,
5318 : __out_opt LPDWORD lpMaxInstances
5319 : );
5320 :
5321 : WINBASEAPI
5322 : BOOL
5323 : WINAPI
5324 : PeekNamedPipe(
5325 : __in HANDLE hNamedPipe,
5326 : __out_bcount_part_opt(nBufferSize, *lpBytesRead) LPVOID lpBuffer,
5327 : __in DWORD nBufferSize,
5328 : __out_opt LPDWORD lpBytesRead,
5329 : __out_opt LPDWORD lpTotalBytesAvail,
5330 : __out_opt LPDWORD lpBytesLeftThisMessage
5331 : );
5332 :
5333 : WINBASEAPI
5334 : BOOL
5335 : WINAPI
5336 : TransactNamedPipe(
5337 : __in HANDLE hNamedPipe,
5338 : __in_bcount_opt(nInBufferSize) LPVOID lpInBuffer,
5339 : __in DWORD nInBufferSize,
5340 : __out_bcount_part_opt(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
5341 : __in DWORD nOutBufferSize,
5342 : __out LPDWORD lpBytesRead,
5343 : __inout_opt LPOVERLAPPED lpOverlapped
5344 : );
5345 :
5346 : WINBASEAPI
5347 : __out
5348 : HANDLE
5349 : WINAPI
5350 : CreateMailslotA(
5351 : __in LPCSTR lpName,
5352 : __in DWORD nMaxMessageSize,
5353 : __in DWORD lReadTimeout,
5354 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
5355 : );
5356 : WINBASEAPI
5357 : __out
5358 : HANDLE
5359 : WINAPI
5360 : CreateMailslotW(
5361 : __in LPCWSTR lpName,
5362 : __in DWORD nMaxMessageSize,
5363 : __in DWORD lReadTimeout,
5364 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
5365 : );
5366 : #ifdef UNICODE
5367 : #define CreateMailslot CreateMailslotW
5368 : #else
5369 : #define CreateMailslot CreateMailslotA
5370 : #endif // !UNICODE
5371 :
5372 : WINBASEAPI
5373 : BOOL
5374 : WINAPI
5375 : GetMailslotInfo(
5376 : __in HANDLE hMailslot,
5377 : __out_opt LPDWORD lpMaxMessageSize,
5378 : __out_opt LPDWORD lpNextSize,
5379 : __out_opt LPDWORD lpMessageCount,
5380 : __out_opt LPDWORD lpReadTimeout
5381 : );
5382 :
5383 : WINBASEAPI
5384 : BOOL
5385 : WINAPI
5386 : SetMailslotInfo(
5387 : __in HANDLE hMailslot,
5388 : __in DWORD lReadTimeout
5389 : );
5390 :
5391 : WINBASEAPI
5392 : __out_opt __out_data_source(FILE)
5393 : LPVOID
5394 : WINAPI
5395 : MapViewOfFile(
5396 : __in HANDLE hFileMappingObject,
5397 : __in DWORD dwDesiredAccess,
5398 : __in DWORD dwFileOffsetHigh,
5399 : __in DWORD dwFileOffsetLow,
5400 : __in SIZE_T dwNumberOfBytesToMap
5401 : );
5402 :
5403 : WINBASEAPI
5404 : BOOL
5405 : WINAPI
5406 : FlushViewOfFile(
5407 : __in LPCVOID lpBaseAddress,
5408 : __in SIZE_T dwNumberOfBytesToFlush
5409 : );
5410 :
5411 : WINBASEAPI
5412 : BOOL
5413 : WINAPI
5414 : UnmapViewOfFile(
5415 : __in LPCVOID lpBaseAddress
5416 : );
5417 :
5418 : //
5419 : // File Encryption API
5420 : //
5421 :
5422 : WINADVAPI
5423 : BOOL
5424 : WINAPI
5425 : EncryptFileA(
5426 : __in LPCSTR lpFileName
5427 : );
5428 : WINADVAPI
5429 : BOOL
5430 : WINAPI
5431 : EncryptFileW(
5432 : __in LPCWSTR lpFileName
5433 : );
5434 : #ifdef UNICODE
5435 : #define EncryptFile EncryptFileW
5436 : #else
5437 : #define EncryptFile EncryptFileA
5438 : #endif // !UNICODE
5439 :
5440 : WINADVAPI
5441 : BOOL
5442 : WINAPI
5443 : DecryptFileA(
5444 : __in LPCSTR lpFileName,
5445 : __reserved DWORD dwReserved
5446 : );
5447 : WINADVAPI
5448 : BOOL
5449 : WINAPI
5450 : DecryptFileW(
5451 : __in LPCWSTR lpFileName,
5452 : __reserved DWORD dwReserved
5453 : );
5454 : #ifdef UNICODE
5455 : #define DecryptFile DecryptFileW
5456 : #else
5457 : #define DecryptFile DecryptFileA
5458 : #endif // !UNICODE
5459 :
5460 : //
5461 : // Encryption Status Value
5462 : //
5463 :
5464 : #define FILE_ENCRYPTABLE 0
5465 : #define FILE_IS_ENCRYPTED 1
5466 : #define FILE_SYSTEM_ATTR 2
5467 : #define FILE_ROOT_DIR 3
5468 : #define FILE_SYSTEM_DIR 4
5469 : #define FILE_UNKNOWN 5
5470 : #define FILE_SYSTEM_NOT_SUPPORT 6
5471 : #define FILE_USER_DISALLOWED 7
5472 : #define FILE_READ_ONLY 8
5473 : #define FILE_DIR_DISALLOWED 9
5474 :
5475 : WINADVAPI
5476 : BOOL
5477 : WINAPI
5478 : FileEncryptionStatusA(
5479 : __in LPCSTR lpFileName,
5480 : __out LPDWORD lpStatus
5481 : );
5482 : WINADVAPI
5483 : BOOL
5484 : WINAPI
5485 : FileEncryptionStatusW(
5486 : __in LPCWSTR lpFileName,
5487 : __out LPDWORD lpStatus
5488 : );
5489 : #ifdef UNICODE
5490 : #define FileEncryptionStatus FileEncryptionStatusW
5491 : #else
5492 : #define FileEncryptionStatus FileEncryptionStatusA
5493 : #endif // !UNICODE
5494 :
5495 : //
5496 : // Currently defined recovery flags
5497 : //
5498 :
5499 : #define EFS_USE_RECOVERY_KEYS (0x1)
5500 :
5501 : typedef
5502 : DWORD
5503 : (WINAPI *PFE_EXPORT_FUNC)(
5504 : __in_bcount(ulLength) PBYTE pbData,
5505 : __in_opt PVOID pvCallbackContext,
5506 : __in ULONG ulLength
5507 : );
5508 :
5509 : typedef
5510 : DWORD
5511 : (WINAPI *PFE_IMPORT_FUNC)(
5512 : __out_bcount_part(*ulLength, *ulLength) PBYTE pbData,
5513 : __in_opt PVOID pvCallbackContext,
5514 : __inout PULONG ulLength
5515 : );
5516 :
5517 :
5518 : //
5519 : // OpenRaw flag values
5520 : //
5521 :
5522 : #define CREATE_FOR_IMPORT (1)
5523 : #define CREATE_FOR_DIR (2)
5524 : #define OVERWRITE_HIDDEN (4)
5525 : #define EFSRPC_SECURE_ONLY (8)
5526 :
5527 :
5528 : WINADVAPI
5529 : DWORD
5530 : WINAPI
5531 : OpenEncryptedFileRawA(
5532 : __in LPCSTR lpFileName,
5533 : __in ULONG ulFlags,
5534 : __deref_out PVOID *pvContext
5535 : );
5536 : WINADVAPI
5537 : DWORD
5538 : WINAPI
5539 : OpenEncryptedFileRawW(
5540 : __in LPCWSTR lpFileName,
5541 : __in ULONG ulFlags,
5542 : __deref_out PVOID *pvContext
5543 : );
5544 : #ifdef UNICODE
5545 : #define OpenEncryptedFileRaw OpenEncryptedFileRawW
5546 : #else
5547 : #define OpenEncryptedFileRaw OpenEncryptedFileRawA
5548 : #endif // !UNICODE
5549 :
5550 : WINADVAPI
5551 : DWORD
5552 : WINAPI
5553 : ReadEncryptedFileRaw(
5554 : __in PFE_EXPORT_FUNC pfExportCallback,
5555 : __in_opt PVOID pvCallbackContext,
5556 : __in PVOID pvContext
5557 : );
5558 :
5559 : WINADVAPI
5560 : DWORD
5561 : WINAPI
5562 : WriteEncryptedFileRaw(
5563 : __in PFE_IMPORT_FUNC pfImportCallback,
5564 : __in_opt PVOID pvCallbackContext,
5565 : __in PVOID pvContext
5566 : );
5567 :
5568 : WINADVAPI
5569 : VOID
5570 : WINAPI
5571 : CloseEncryptedFileRaw(
5572 : __in PVOID pvContext
5573 : );
5574 :
5575 : //
5576 : // _l Compat Functions
5577 : //
5578 :
5579 : WINBASEAPI
5580 : int
5581 : WINAPI
5582 : lstrcmpA(
5583 : __in LPCSTR lpString1,
5584 : __in LPCSTR lpString2
5585 : );
5586 : WINBASEAPI
5587 : int
5588 : WINAPI
5589 : lstrcmpW(
5590 : __in LPCWSTR lpString1,
5591 : __in LPCWSTR lpString2
5592 : );
5593 : #ifdef UNICODE
5594 : #define lstrcmp lstrcmpW
5595 : #else
5596 : #define lstrcmp lstrcmpA
5597 : #endif // !UNICODE
5598 :
5599 : WINBASEAPI
5600 : int
5601 : WINAPI
5602 : lstrcmpiA(
5603 : __in LPCSTR lpString1,
5604 : __in LPCSTR lpString2
5605 : );
5606 : WINBASEAPI
5607 : int
5608 : WINAPI
5609 : lstrcmpiW(
5610 : __in LPCWSTR lpString1,
5611 : __in LPCWSTR lpString2
5612 : );
5613 : #ifdef UNICODE
5614 : #define lstrcmpi lstrcmpiW
5615 : #else
5616 : #define lstrcmpi lstrcmpiA
5617 : #endif // !UNICODE
5618 :
5619 : WINBASEAPI
5620 : __out
5621 : LPSTR
5622 : WINAPI
5623 : lstrcpynA(
5624 : __out_ecount(iMaxLength) LPSTR lpString1,
5625 : __in LPCSTR lpString2,
5626 : __in int iMaxLength
5627 : );
5628 : WINBASEAPI
5629 : __out
5630 : LPWSTR
5631 : WINAPI
5632 : lstrcpynW(
5633 : __out_ecount(iMaxLength) LPWSTR lpString1,
5634 : __in LPCWSTR lpString2,
5635 : __in int iMaxLength
5636 : );
5637 : #ifdef UNICODE
5638 : #define lstrcpyn lstrcpynW
5639 : #else
5640 : #define lstrcpyn lstrcpynA
5641 : #endif // !UNICODE
5642 :
5643 : #if defined(DEPRECATE_SUPPORTED)
5644 : #pragma warning(push)
5645 : #pragma warning(disable:4995)
5646 : #endif
5647 :
5648 : WINBASEAPI
5649 : __out
5650 : LPSTR
5651 : WINAPI
5652 : lstrcpyA(
5653 : __out LPSTR lpString1,
5654 : __in LPCSTR lpString2
5655 : );
5656 : WINBASEAPI
5657 : __out
5658 : LPWSTR
5659 : WINAPI
5660 : lstrcpyW(
5661 : __out LPWSTR lpString1,
5662 : __in LPCWSTR lpString2
5663 : );
5664 : #ifdef UNICODE
5665 : #define lstrcpy lstrcpyW
5666 : #else
5667 : #define lstrcpy lstrcpyA
5668 : #endif // !UNICODE
5669 :
5670 : WINBASEAPI
5671 : __out
5672 : LPSTR
5673 : WINAPI
5674 : lstrcatA(
5675 : __inout LPSTR lpString1,
5676 : __in LPCSTR lpString2
5677 : );
5678 : WINBASEAPI
5679 : __out
5680 : LPWSTR
5681 : WINAPI
5682 : lstrcatW(
5683 : __inout LPWSTR lpString1,
5684 : __in LPCWSTR lpString2
5685 : );
5686 : #ifdef UNICODE
5687 : #define lstrcat lstrcatW
5688 : #else
5689 : #define lstrcat lstrcatA
5690 : #endif // !UNICODE
5691 :
5692 : #if defined(DEPRECATE_SUPPORTED)
5693 : #pragma warning(pop)
5694 : #endif
5695 :
5696 : WINBASEAPI
5697 : int
5698 : WINAPI
5699 : lstrlenA(
5700 : __in LPCSTR lpString
5701 : );
5702 : WINBASEAPI
5703 : int
5704 : WINAPI
5705 : lstrlenW(
5706 : __in LPCWSTR lpString
5707 : );
5708 : #ifdef UNICODE
5709 : #define lstrlen lstrlenW
5710 : #else
5711 : #define lstrlen lstrlenA
5712 : #endif // !UNICODE
5713 :
5714 : WINBASEAPI
5715 : HFILE
5716 : WINAPI
5717 : OpenFile(
5718 : __in LPCSTR lpFileName,
5719 : __inout LPOFSTRUCT lpReOpenBuff,
5720 : __in UINT uStyle
5721 : );
5722 :
5723 : WINBASEAPI
5724 : HFILE
5725 : WINAPI
5726 : _lopen(
5727 : __in LPCSTR lpPathName,
5728 : __in int iReadWrite
5729 : );
5730 :
5731 : WINBASEAPI
5732 : HFILE
5733 : WINAPI
5734 : _lcreat(
5735 : __in LPCSTR lpPathName,
5736 : __in int iAttribute
5737 : );
5738 :
5739 : WINBASEAPI
5740 : UINT
5741 : WINAPI
5742 : _lread(
5743 : __in HFILE hFile,
5744 : __out_bcount_part(uBytes, return) LPVOID lpBuffer,
5745 : __in UINT uBytes
5746 : );
5747 :
5748 : WINBASEAPI
5749 : UINT
5750 : WINAPI
5751 : _lwrite(
5752 : __in HFILE hFile,
5753 : __in_bcount(uBytes) LPCCH lpBuffer,
5754 : __in UINT uBytes
5755 : );
5756 :
5757 : WINBASEAPI
5758 : long
5759 : WINAPI
5760 : _hread(
5761 : __in HFILE hFile,
5762 : __out_bcount_part(lBytes, return) LPVOID lpBuffer,
5763 : __in long lBytes
5764 : );
5765 :
5766 : WINBASEAPI
5767 : long
5768 : WINAPI
5769 : _hwrite(
5770 : __in HFILE hFile,
5771 : __in_bcount(lBytes) LPCCH lpBuffer,
5772 : __in long lBytes
5773 : );
5774 :
5775 : WINBASEAPI
5776 : HFILE
5777 : WINAPI
5778 : _lclose(
5779 : __in HFILE hFile
5780 : );
5781 :
5782 : WINBASEAPI
5783 : LONG
5784 : WINAPI
5785 : _llseek(
5786 : __in HFILE hFile,
5787 : __in LONG lOffset,
5788 : __in int iOrigin
5789 : );
5790 :
5791 : WINADVAPI
5792 : BOOL
5793 : WINAPI
5794 : IsTextUnicode(
5795 : __in_bcount(iSize) CONST VOID* lpv,
5796 : __in int iSize,
5797 : __inout_opt LPINT lpiResult
5798 : );
5799 :
5800 : #define FLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
5801 :
5802 : WINBASEAPI
5803 : DWORD
5804 : WINAPI
5805 : FlsAlloc(
5806 : __in_opt PFLS_CALLBACK_FUNCTION lpCallback
5807 : );
5808 :
5809 : WINBASEAPI
5810 : PVOID
5811 : WINAPI
5812 : FlsGetValue(
5813 : __in DWORD dwFlsIndex
5814 : );
5815 :
5816 : WINBASEAPI
5817 : BOOL
5818 : WINAPI
5819 : FlsSetValue(
5820 : __in DWORD dwFlsIndex,
5821 : __in_opt PVOID lpFlsData
5822 : );
5823 :
5824 : WINBASEAPI
5825 : BOOL
5826 : WINAPI
5827 : FlsFree(
5828 : __in DWORD dwFlsIndex
5829 : );
5830 :
5831 : #define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
5832 :
5833 : WINBASEAPI
5834 : DWORD
5835 : WINAPI
5836 : TlsAlloc(
5837 : VOID
5838 : );
5839 :
5840 : WINBASEAPI
5841 : LPVOID
5842 : WINAPI
5843 : TlsGetValue(
5844 : __in DWORD dwTlsIndex
5845 : );
5846 :
5847 : WINBASEAPI
5848 : BOOL
5849 : WINAPI
5850 : TlsSetValue(
5851 : __in DWORD dwTlsIndex,
5852 : __in_opt LPVOID lpTlsValue
5853 : );
5854 :
5855 : WINBASEAPI
5856 : BOOL
5857 : WINAPI
5858 : TlsFree(
5859 : __in DWORD dwTlsIndex
5860 : );
5861 :
5862 : typedef
5863 : VOID
5864 : (WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)(
5865 : __in DWORD dwErrorCode,
5866 : __in DWORD dwNumberOfBytesTransfered,
5867 : __inout LPOVERLAPPED lpOverlapped
5868 : );
5869 :
5870 : WINBASEAPI
5871 : DWORD
5872 : WINAPI
5873 : SleepEx(
5874 : __in DWORD dwMilliseconds,
5875 : __in BOOL bAlertable
5876 : );
5877 :
5878 : WINBASEAPI
5879 : DWORD
5880 : WINAPI
5881 : WaitForSingleObjectEx(
5882 : __in HANDLE hHandle,
5883 : __in DWORD dwMilliseconds,
5884 : __in BOOL bAlertable
5885 : );
5886 :
5887 : WINBASEAPI
5888 : DWORD
5889 : WINAPI
5890 : WaitForMultipleObjectsEx(
5891 : __in DWORD nCount,
5892 : __in_ecount(nCount) CONST HANDLE *lpHandles,
5893 : __in BOOL bWaitAll,
5894 : __in DWORD dwMilliseconds,
5895 : __in BOOL bAlertable
5896 : );
5897 :
5898 : #if(_WIN32_WINNT >= 0x0400)
5899 : WINBASEAPI
5900 : DWORD
5901 : WINAPI
5902 : SignalObjectAndWait(
5903 : __in HANDLE hObjectToSignal,
5904 : __in HANDLE hObjectToWaitOn,
5905 : __in DWORD dwMilliseconds,
5906 : __in BOOL bAlertable
5907 : );
5908 : #endif /* _WIN32_WINNT >= 0x0400 */
5909 :
5910 : WINBASEAPI
5911 : BOOL
5912 : WINAPI
5913 : ReadFileEx(
5914 : __in HANDLE hFile,
5915 : __out_bcount_opt(nNumberOfBytesToRead) __out_data_source(FILE) LPVOID lpBuffer,
5916 : __in DWORD nNumberOfBytesToRead,
5917 : __inout LPOVERLAPPED lpOverlapped,
5918 : __in_opt LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
5919 : );
5920 :
5921 : WINBASEAPI
5922 : BOOL
5923 : WINAPI
5924 : WriteFileEx(
5925 : __in HANDLE hFile,
5926 : __in_bcount_opt(nNumberOfBytesToWrite) LPCVOID lpBuffer,
5927 : __in DWORD nNumberOfBytesToWrite,
5928 : __inout LPOVERLAPPED lpOverlapped,
5929 : __in_opt LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
5930 : );
5931 :
5932 : WINBASEAPI
5933 : BOOL
5934 : WINAPI
5935 : BackupRead(
5936 : __in HANDLE hFile,
5937 : __out_bcount_part(nNumberOfBytesToRead, *lpNumberOfBytesRead) LPBYTE lpBuffer,
5938 : __in DWORD nNumberOfBytesToRead,
5939 : __out LPDWORD lpNumberOfBytesRead,
5940 : __in BOOL bAbort,
5941 : __in BOOL bProcessSecurity,
5942 : __inout LPVOID *lpContext
5943 : );
5944 :
5945 : WINBASEAPI
5946 : BOOL
5947 : WINAPI
5948 : BackupSeek(
5949 : __in HANDLE hFile,
5950 : __in DWORD dwLowBytesToSeek,
5951 : __in DWORD dwHighBytesToSeek,
5952 : __out LPDWORD lpdwLowByteSeeked,
5953 : __out LPDWORD lpdwHighByteSeeked,
5954 : __inout LPVOID *lpContext
5955 : );
5956 :
5957 : WINBASEAPI
5958 : BOOL
5959 : WINAPI
5960 : BackupWrite(
5961 : __in HANDLE hFile,
5962 : __in_bcount(nNumberOfBytesToWrite) LPBYTE lpBuffer,
5963 : __in DWORD nNumberOfBytesToWrite,
5964 : __out LPDWORD lpNumberOfBytesWritten,
5965 : __in BOOL bAbort,
5966 : __in BOOL bProcessSecurity,
5967 : __inout LPVOID *lpContext
5968 : );
5969 :
5970 : //
5971 : // Stream id structure
5972 : //
5973 : typedef struct _WIN32_STREAM_ID {
5974 : DWORD dwStreamId ;
5975 : DWORD dwStreamAttributes ;
5976 : LARGE_INTEGER Size ;
5977 : DWORD dwStreamNameSize ;
5978 : WCHAR cStreamName[ ANYSIZE_ARRAY ] ;
5979 : } WIN32_STREAM_ID, *LPWIN32_STREAM_ID ;
5980 :
5981 : //
5982 : // Stream Ids
5983 : //
5984 :
5985 : #define BACKUP_INVALID 0x00000000
5986 : #define BACKUP_DATA 0x00000001
5987 : #define BACKUP_EA_DATA 0x00000002
5988 : #define BACKUP_SECURITY_DATA 0x00000003
5989 : #define BACKUP_ALTERNATE_DATA 0x00000004
5990 : #define BACKUP_LINK 0x00000005
5991 : #define BACKUP_PROPERTY_DATA 0x00000006
5992 : #define BACKUP_OBJECT_ID 0x00000007
5993 : #define BACKUP_REPARSE_DATA 0x00000008
5994 : #define BACKUP_SPARSE_BLOCK 0x00000009
5995 : #define BACKUP_TXFS_DATA 0x0000000a
5996 :
5997 :
5998 : //
5999 : // Stream Attributes
6000 : //
6001 :
6002 : #define STREAM_NORMAL_ATTRIBUTE 0x00000000
6003 : #define STREAM_MODIFIED_WHEN_READ 0x00000001
6004 : #define STREAM_CONTAINS_SECURITY 0x00000002
6005 : #define STREAM_CONTAINS_PROPERTIES 0x00000004
6006 : #define STREAM_SPARSE_ATTRIBUTE 0x00000008
6007 :
6008 : WINBASEAPI
6009 : BOOL
6010 : WINAPI
6011 : ReadFileScatter(
6012 : __in HANDLE hFile,
6013 : __in FILE_SEGMENT_ELEMENT aSegmentArray[],
6014 : __in DWORD nNumberOfBytesToRead,
6015 : __reserved LPDWORD lpReserved,
6016 : __inout LPOVERLAPPED lpOverlapped
6017 : );
6018 :
6019 : WINBASEAPI
6020 : BOOL
6021 : WINAPI
6022 : WriteFileGather(
6023 : __in HANDLE hFile,
6024 : __in FILE_SEGMENT_ELEMENT aSegmentArray[],
6025 : __in DWORD nNumberOfBytesToWrite,
6026 : __reserved LPDWORD lpReserved,
6027 : __inout LPOVERLAPPED lpOverlapped
6028 : );
6029 :
6030 : //
6031 : // Dual Mode API below this line. Dual Mode Structures also included.
6032 : //
6033 :
6034 : #define STARTF_USESHOWWINDOW 0x00000001
6035 : #define STARTF_USESIZE 0x00000002
6036 : #define STARTF_USEPOSITION 0x00000004
6037 : #define STARTF_USECOUNTCHARS 0x00000008
6038 : #define STARTF_USEFILLATTRIBUTE 0x00000010
6039 : #define STARTF_RUNFULLSCREEN 0x00000020 // ignored for non-x86 platforms
6040 : #define STARTF_FORCEONFEEDBACK 0x00000040
6041 : #define STARTF_FORCEOFFFEEDBACK 0x00000080
6042 : #define STARTF_USESTDHANDLES 0x00000100
6043 :
6044 : #if(WINVER >= 0x0400)
6045 :
6046 : #define STARTF_USEHOTKEY 0x00000200
6047 : #endif /* WINVER >= 0x0400 */
6048 :
6049 : typedef struct _STARTUPINFOA {
6050 : DWORD cb;
6051 : LPSTR lpReserved;
6052 : LPSTR lpDesktop;
6053 : LPSTR lpTitle;
6054 : DWORD dwX;
6055 : DWORD dwY;
6056 : DWORD dwXSize;
6057 : DWORD dwYSize;
6058 : DWORD dwXCountChars;
6059 : DWORD dwYCountChars;
6060 : DWORD dwFillAttribute;
6061 : DWORD dwFlags;
6062 : WORD wShowWindow;
6063 : WORD cbReserved2;
6064 : LPBYTE lpReserved2;
6065 : HANDLE hStdInput;
6066 : HANDLE hStdOutput;
6067 : HANDLE hStdError;
6068 : } STARTUPINFOA, *LPSTARTUPINFOA;
6069 : typedef struct _STARTUPINFOW {
6070 : DWORD cb;
6071 : LPWSTR lpReserved;
6072 : LPWSTR lpDesktop;
6073 : LPWSTR lpTitle;
6074 : DWORD dwX;
6075 : DWORD dwY;
6076 : DWORD dwXSize;
6077 : DWORD dwYSize;
6078 : DWORD dwXCountChars;
6079 : DWORD dwYCountChars;
6080 : DWORD dwFillAttribute;
6081 : DWORD dwFlags;
6082 : WORD wShowWindow;
6083 : WORD cbReserved2;
6084 : LPBYTE lpReserved2;
6085 : HANDLE hStdInput;
6086 : HANDLE hStdOutput;
6087 : HANDLE hStdError;
6088 : } STARTUPINFOW, *LPSTARTUPINFOW;
6089 : #ifdef UNICODE
6090 : typedef STARTUPINFOW STARTUPINFO;
6091 : typedef LPSTARTUPINFOW LPSTARTUPINFO;
6092 : #else
6093 : typedef STARTUPINFOA STARTUPINFO;
6094 : typedef LPSTARTUPINFOA LPSTARTUPINFO;
6095 : #endif // UNICODE
6096 :
6097 : typedef struct _STARTUPINFOEXA {
6098 : STARTUPINFOA StartupInfo;
6099 : struct _PROC_THREAD_ATTRIBUTE_LIST *lpAttributeList;
6100 : } STARTUPINFOEXA, *LPSTARTUPINFOEXA;
6101 : typedef struct _STARTUPINFOEXW {
6102 : STARTUPINFOW StartupInfo;
6103 : struct _PROC_THREAD_ATTRIBUTE_LIST *lpAttributeList;
6104 : } STARTUPINFOEXW, *LPSTARTUPINFOEXW;
6105 : #ifdef UNICODE
6106 : typedef STARTUPINFOEXW STARTUPINFOEX;
6107 : typedef LPSTARTUPINFOEXW LPSTARTUPINFOEX;
6108 : #else
6109 : typedef STARTUPINFOEXA STARTUPINFOEX;
6110 : typedef LPSTARTUPINFOEXA LPSTARTUPINFOEX;
6111 : #endif // UNICODE
6112 :
6113 : #define SHUTDOWN_NORETRY 0x00000001
6114 :
6115 : typedef struct _WIN32_FIND_DATAA {
6116 : DWORD dwFileAttributes;
6117 : FILETIME ftCreationTime;
6118 : FILETIME ftLastAccessTime;
6119 : FILETIME ftLastWriteTime;
6120 : DWORD nFileSizeHigh;
6121 : DWORD nFileSizeLow;
6122 : DWORD dwReserved0;
6123 : DWORD dwReserved1;
6124 : CHAR cFileName[ MAX_PATH ];
6125 : CHAR cAlternateFileName[ 14 ];
6126 : #ifdef _MAC
6127 : DWORD dwFileType;
6128 : DWORD dwCreatorType;
6129 : WORD wFinderFlags;
6130 : #endif
6131 : } WIN32_FIND_DATAA, *PWIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
6132 : typedef struct _WIN32_FIND_DATAW {
6133 : DWORD dwFileAttributes;
6134 : FILETIME ftCreationTime;
6135 : FILETIME ftLastAccessTime;
6136 : FILETIME ftLastWriteTime;
6137 : DWORD nFileSizeHigh;
6138 : DWORD nFileSizeLow;
6139 : DWORD dwReserved0;
6140 : DWORD dwReserved1;
6141 : WCHAR cFileName[ MAX_PATH ];
6142 : WCHAR cAlternateFileName[ 14 ];
6143 : #ifdef _MAC
6144 : DWORD dwFileType;
6145 : DWORD dwCreatorType;
6146 : WORD wFinderFlags;
6147 : #endif
6148 : } WIN32_FIND_DATAW, *PWIN32_FIND_DATAW, *LPWIN32_FIND_DATAW;
6149 : #ifdef UNICODE
6150 : typedef WIN32_FIND_DATAW WIN32_FIND_DATA;
6151 : typedef PWIN32_FIND_DATAW PWIN32_FIND_DATA;
6152 : typedef LPWIN32_FIND_DATAW LPWIN32_FIND_DATA;
6153 : #else
6154 : typedef WIN32_FIND_DATAA WIN32_FIND_DATA;
6155 : typedef PWIN32_FIND_DATAA PWIN32_FIND_DATA;
6156 : typedef LPWIN32_FIND_DATAA LPWIN32_FIND_DATA;
6157 : #endif // UNICODE
6158 :
6159 : typedef struct _WIN32_FILE_ATTRIBUTE_DATA {
6160 : DWORD dwFileAttributes;
6161 : FILETIME ftCreationTime;
6162 : FILETIME ftLastAccessTime;
6163 : FILETIME ftLastWriteTime;
6164 : DWORD nFileSizeHigh;
6165 : DWORD nFileSizeLow;
6166 : } WIN32_FILE_ATTRIBUTE_DATA, *LPWIN32_FILE_ATTRIBUTE_DATA;
6167 :
6168 : //
6169 : // Synchronization APIs
6170 : //
6171 :
6172 : WINBASEAPI
6173 : __out_opt
6174 : HANDLE
6175 : WINAPI
6176 : CreateMutexA(
6177 : __in_opt LPSECURITY_ATTRIBUTES lpMutexAttributes,
6178 : __in BOOL bInitialOwner,
6179 : __in_opt LPCSTR lpName
6180 : );
6181 : WINBASEAPI
6182 : __out_opt
6183 : HANDLE
6184 : WINAPI
6185 : CreateMutexW(
6186 : __in_opt LPSECURITY_ATTRIBUTES lpMutexAttributes,
6187 : __in BOOL bInitialOwner,
6188 : __in_opt LPCWSTR lpName
6189 : );
6190 : #ifdef UNICODE
6191 : #define CreateMutex CreateMutexW
6192 : #else
6193 : #define CreateMutex CreateMutexA
6194 : #endif // !UNICODE
6195 :
6196 : WINBASEAPI
6197 : __out_opt
6198 : HANDLE
6199 : WINAPI
6200 : OpenMutexA(
6201 : __in DWORD dwDesiredAccess,
6202 : __in BOOL bInheritHandle,
6203 : __in LPCSTR lpName
6204 : );
6205 : WINBASEAPI
6206 : __out_opt
6207 : HANDLE
6208 : WINAPI
6209 : OpenMutexW(
6210 : __in DWORD dwDesiredAccess,
6211 : __in BOOL bInheritHandle,
6212 : __in LPCWSTR lpName
6213 : );
6214 : #ifdef UNICODE
6215 : #define OpenMutex OpenMutexW
6216 : #else
6217 : #define OpenMutex OpenMutexA
6218 : #endif // !UNICODE
6219 :
6220 : WINBASEAPI
6221 : __out_opt
6222 : HANDLE
6223 : WINAPI
6224 : CreateEventA(
6225 : __in_opt LPSECURITY_ATTRIBUTES lpEventAttributes,
6226 : __in BOOL bManualReset,
6227 : __in BOOL bInitialState,
6228 : __in_opt LPCSTR lpName
6229 : );
6230 : WINBASEAPI
6231 : __out_opt
6232 : HANDLE
6233 : WINAPI
6234 : CreateEventW(
6235 : __in_opt LPSECURITY_ATTRIBUTES lpEventAttributes,
6236 : __in BOOL bManualReset,
6237 : __in BOOL bInitialState,
6238 : __in_opt LPCWSTR lpName
6239 : );
6240 : #ifdef UNICODE
6241 : #define CreateEvent CreateEventW
6242 : #else
6243 : #define CreateEvent CreateEventA
6244 : #endif // !UNICODE
6245 :
6246 : WINBASEAPI
6247 : __out_opt
6248 : HANDLE
6249 : WINAPI
6250 : OpenEventA(
6251 : __in DWORD dwDesiredAccess,
6252 : __in BOOL bInheritHandle,
6253 : __in LPCSTR lpName
6254 : );
6255 : WINBASEAPI
6256 : __out_opt
6257 : HANDLE
6258 : WINAPI
6259 : OpenEventW(
6260 : __in DWORD dwDesiredAccess,
6261 : __in BOOL bInheritHandle,
6262 : __in LPCWSTR lpName
6263 : );
6264 : #ifdef UNICODE
6265 : #define OpenEvent OpenEventW
6266 : #else
6267 : #define OpenEvent OpenEventA
6268 : #endif // !UNICODE
6269 :
6270 : WINBASEAPI
6271 : __out_opt
6272 : HANDLE
6273 : WINAPI
6274 : CreateSemaphoreA(
6275 : __in_opt LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
6276 : __in LONG lInitialCount,
6277 : __in LONG lMaximumCount,
6278 : __in_opt LPCSTR lpName
6279 : );
6280 : WINBASEAPI
6281 : __out_opt
6282 : HANDLE
6283 : WINAPI
6284 : CreateSemaphoreW(
6285 : __in_opt LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
6286 : __in LONG lInitialCount,
6287 : __in LONG lMaximumCount,
6288 : __in_opt LPCWSTR lpName
6289 : );
6290 : #ifdef UNICODE
6291 : #define CreateSemaphore CreateSemaphoreW
6292 : #else
6293 : #define CreateSemaphore CreateSemaphoreA
6294 : #endif // !UNICODE
6295 :
6296 : WINBASEAPI
6297 : __out_opt
6298 : HANDLE
6299 : WINAPI
6300 : OpenSemaphoreA(
6301 : __in DWORD dwDesiredAccess,
6302 : __in BOOL bInheritHandle,
6303 : __in LPCSTR lpName
6304 : );
6305 : WINBASEAPI
6306 : __out_opt
6307 : HANDLE
6308 : WINAPI
6309 : OpenSemaphoreW(
6310 : __in DWORD dwDesiredAccess,
6311 : __in BOOL bInheritHandle,
6312 : __in LPCWSTR lpName
6313 : );
6314 : #ifdef UNICODE
6315 : #define OpenSemaphore OpenSemaphoreW
6316 : #else
6317 : #define OpenSemaphore OpenSemaphoreA
6318 : #endif // !UNICODE
6319 :
6320 : #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
6321 : typedef
6322 : VOID
6323 : (APIENTRY *PTIMERAPCROUTINE)(
6324 : __in_opt LPVOID lpArgToCompletionRoutine,
6325 : __in DWORD dwTimerLowValue,
6326 : __in DWORD dwTimerHighValue
6327 : );
6328 :
6329 : WINBASEAPI
6330 : __out_opt
6331 : HANDLE
6332 : WINAPI
6333 : CreateWaitableTimerA(
6334 : __in_opt LPSECURITY_ATTRIBUTES lpTimerAttributes,
6335 : __in BOOL bManualReset,
6336 : __in_opt LPCSTR lpTimerName
6337 : );
6338 : WINBASEAPI
6339 : __out_opt
6340 : HANDLE
6341 : WINAPI
6342 : CreateWaitableTimerW(
6343 : __in_opt LPSECURITY_ATTRIBUTES lpTimerAttributes,
6344 : __in BOOL bManualReset,
6345 : __in_opt LPCWSTR lpTimerName
6346 : );
6347 : #ifdef UNICODE
6348 : #define CreateWaitableTimer CreateWaitableTimerW
6349 : #else
6350 : #define CreateWaitableTimer CreateWaitableTimerA
6351 : #endif // !UNICODE
6352 :
6353 : WINBASEAPI
6354 : __out_opt
6355 : HANDLE
6356 : WINAPI
6357 : OpenWaitableTimerA(
6358 : __in DWORD dwDesiredAccess,
6359 : __in BOOL bInheritHandle,
6360 : __in LPCSTR lpTimerName
6361 : );
6362 : WINBASEAPI
6363 : __out_opt
6364 : HANDLE
6365 : WINAPI
6366 : OpenWaitableTimerW(
6367 : __in DWORD dwDesiredAccess,
6368 : __in BOOL bInheritHandle,
6369 : __in LPCWSTR lpTimerName
6370 : );
6371 : #ifdef UNICODE
6372 : #define OpenWaitableTimer OpenWaitableTimerW
6373 : #else
6374 : #define OpenWaitableTimer OpenWaitableTimerA
6375 : #endif // !UNICODE
6376 :
6377 : WINBASEAPI
6378 : BOOL
6379 : WINAPI
6380 : SetWaitableTimer(
6381 : __in HANDLE hTimer,
6382 : __in const LARGE_INTEGER *lpDueTime,
6383 : __in LONG lPeriod,
6384 : __in_opt PTIMERAPCROUTINE pfnCompletionRoutine,
6385 : __in_opt LPVOID lpArgToCompletionRoutine,
6386 : __in BOOL fResume
6387 : );
6388 :
6389 : WINBASEAPI
6390 : BOOL
6391 : WINAPI
6392 : CancelWaitableTimer(
6393 : __in HANDLE hTimer
6394 : );
6395 :
6396 : #if (_WIN32_WINNT >= 0x0600)
6397 :
6398 : #define CREATE_MUTEX_INITIAL_OWNER 0x00000001
6399 :
6400 : WINBASEAPI
6401 : __out_opt
6402 : HANDLE
6403 : WINAPI
6404 : CreateMutexExA(
6405 : __in_opt LPSECURITY_ATTRIBUTES lpMutexAttributes,
6406 : __in_opt LPCSTR lpName,
6407 : __in DWORD dwFlags,
6408 : __in DWORD dwDesiredAccess
6409 : );
6410 : WINBASEAPI
6411 : __out_opt
6412 : HANDLE
6413 : WINAPI
6414 : CreateMutexExW(
6415 : __in_opt LPSECURITY_ATTRIBUTES lpMutexAttributes,
6416 : __in_opt LPCWSTR lpName,
6417 : __in DWORD dwFlags,
6418 : __in DWORD dwDesiredAccess
6419 : );
6420 : #ifdef UNICODE
6421 : #define CreateMutexEx CreateMutexExW
6422 : #else
6423 : #define CreateMutexEx CreateMutexExA
6424 : #endif // !UNICODE
6425 :
6426 : #define CREATE_EVENT_MANUAL_RESET 0x00000001
6427 : #define CREATE_EVENT_INITIAL_SET 0x00000002
6428 :
6429 : WINBASEAPI
6430 : __out_opt
6431 : HANDLE
6432 : WINAPI
6433 : CreateEventExA(
6434 : __in_opt LPSECURITY_ATTRIBUTES lpEventAttributes,
6435 : __in_opt LPCSTR lpName,
6436 : __in DWORD dwFlags,
6437 : __in DWORD dwDesiredAccess
6438 : );
6439 : WINBASEAPI
6440 : __out_opt
6441 : HANDLE
6442 : WINAPI
6443 : CreateEventExW(
6444 : __in_opt LPSECURITY_ATTRIBUTES lpEventAttributes,
6445 : __in_opt LPCWSTR lpName,
6446 : __in DWORD dwFlags,
6447 : __in DWORD dwDesiredAccess
6448 : );
6449 : #ifdef UNICODE
6450 : #define CreateEventEx CreateEventExW
6451 : #else
6452 : #define CreateEventEx CreateEventExA
6453 : #endif // !UNICODE
6454 :
6455 : WINBASEAPI
6456 : __out_opt
6457 : HANDLE
6458 : WINAPI
6459 : CreateSemaphoreExA(
6460 : __in_opt LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
6461 : __in LONG lInitialCount,
6462 : __in LONG lMaximumCount,
6463 : __in_opt LPCSTR lpName,
6464 : __reserved DWORD dwFlags,
6465 : __in DWORD dwDesiredAccess
6466 : );
6467 : WINBASEAPI
6468 : __out_opt
6469 : HANDLE
6470 : WINAPI
6471 : CreateSemaphoreExW(
6472 : __in_opt LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
6473 : __in LONG lInitialCount,
6474 : __in LONG lMaximumCount,
6475 : __in_opt LPCWSTR lpName,
6476 : __reserved DWORD dwFlags,
6477 : __in DWORD dwDesiredAccess
6478 : );
6479 : #ifdef UNICODE
6480 : #define CreateSemaphoreEx CreateSemaphoreExW
6481 : #else
6482 : #define CreateSemaphoreEx CreateSemaphoreExA
6483 : #endif // !UNICODE
6484 :
6485 : #define CREATE_WAITABLE_TIMER_MANUAL_RESET 0x00000001
6486 :
6487 : WINBASEAPI
6488 : __out_opt
6489 : HANDLE
6490 : WINAPI
6491 : CreateWaitableTimerExA(
6492 : __in_opt LPSECURITY_ATTRIBUTES lpTimerAttributes,
6493 : __in_opt LPCSTR lpTimerName,
6494 : __in DWORD dwFlags,
6495 : __in DWORD dwDesiredAccess
6496 : );
6497 : WINBASEAPI
6498 : __out_opt
6499 : HANDLE
6500 : WINAPI
6501 : CreateWaitableTimerExW(
6502 : __in_opt LPSECURITY_ATTRIBUTES lpTimerAttributes,
6503 : __in_opt LPCWSTR lpTimerName,
6504 : __in DWORD dwFlags,
6505 : __in DWORD dwDesiredAccess
6506 : );
6507 : #ifdef UNICODE
6508 : #define CreateWaitableTimerEx CreateWaitableTimerExW
6509 : #else
6510 : #define CreateWaitableTimerEx CreateWaitableTimerExA
6511 : #endif // !UNICODE
6512 :
6513 : #endif /* (_WIN32_WINNT >= 0x0600) */
6514 :
6515 : #endif /* (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) */
6516 :
6517 : WINBASEAPI
6518 : __out_opt
6519 : HANDLE
6520 : WINAPI
6521 : CreateFileMappingA(
6522 : __in HANDLE hFile,
6523 : __in_opt LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
6524 : __in DWORD flProtect,
6525 : __in DWORD dwMaximumSizeHigh,
6526 : __in DWORD dwMaximumSizeLow,
6527 : __in_opt LPCSTR lpName
6528 : );
6529 : WINBASEAPI
6530 : __out_opt
6531 : HANDLE
6532 : WINAPI
6533 : CreateFileMappingW(
6534 : __in HANDLE hFile,
6535 : __in_opt LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
6536 : __in DWORD flProtect,
6537 : __in DWORD dwMaximumSizeHigh,
6538 : __in DWORD dwMaximumSizeLow,
6539 : __in_opt LPCWSTR lpName
6540 : );
6541 : #ifdef UNICODE
6542 : #define CreateFileMapping CreateFileMappingW
6543 : #else
6544 : #define CreateFileMapping CreateFileMappingA
6545 : #endif // !UNICODE
6546 :
6547 : #if _WIN32_WINNT >= 0x0600
6548 :
6549 : WINBASEAPI
6550 : __out_opt
6551 : HANDLE
6552 : WINAPI
6553 : CreateFileMappingNumaA(
6554 : __in HANDLE hFile,
6555 : __in_opt LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
6556 : __in DWORD flProtect,
6557 : __in DWORD dwMaximumSizeHigh,
6558 : __in DWORD dwMaximumSizeLow,
6559 : __in_opt LPCSTR lpName,
6560 : __in DWORD nndPreferred
6561 : );
6562 : WINBASEAPI
6563 : __out_opt
6564 : HANDLE
6565 : WINAPI
6566 : CreateFileMappingNumaW(
6567 : __in HANDLE hFile,
6568 : __in_opt LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
6569 : __in DWORD flProtect,
6570 : __in DWORD dwMaximumSizeHigh,
6571 : __in DWORD dwMaximumSizeLow,
6572 : __in_opt LPCWSTR lpName,
6573 : __in DWORD nndPreferred
6574 : );
6575 : #ifdef UNICODE
6576 : #define CreateFileMappingNuma CreateFileMappingNumaW
6577 : #else
6578 : #define CreateFileMappingNuma CreateFileMappingNumaA
6579 : #endif // !UNICODE
6580 :
6581 : #endif // _WIN32_WINNT >= 0x0600
6582 :
6583 : WINBASEAPI
6584 : __out
6585 : HANDLE
6586 : WINAPI
6587 : OpenFileMappingA(
6588 : __in DWORD dwDesiredAccess,
6589 : __in BOOL bInheritHandle,
6590 : __in LPCSTR lpName
6591 : );
6592 : WINBASEAPI
6593 : __out
6594 : HANDLE
6595 : WINAPI
6596 : OpenFileMappingW(
6597 : __in DWORD dwDesiredAccess,
6598 : __in BOOL bInheritHandle,
6599 : __in LPCWSTR lpName
6600 : );
6601 : #ifdef UNICODE
6602 : #define OpenFileMapping OpenFileMappingW
6603 : #else
6604 : #define OpenFileMapping OpenFileMappingA
6605 : #endif // !UNICODE
6606 :
6607 : WINBASEAPI
6608 : DWORD
6609 : WINAPI
6610 : GetLogicalDriveStringsA(
6611 : __in DWORD nBufferLength,
6612 : __out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer
6613 : );
6614 : WINBASEAPI
6615 : DWORD
6616 : WINAPI
6617 : GetLogicalDriveStringsW(
6618 : __in DWORD nBufferLength,
6619 : __out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer
6620 : );
6621 : #ifdef UNICODE
6622 : #define GetLogicalDriveStrings GetLogicalDriveStringsW
6623 : #else
6624 : #define GetLogicalDriveStrings GetLogicalDriveStringsA
6625 : #endif // !UNICODE
6626 :
6627 : #if _WIN32_WINNT >= 0x0501
6628 :
6629 : typedef enum _MEMORY_RESOURCE_NOTIFICATION_TYPE {
6630 : LowMemoryResourceNotification,
6631 : HighMemoryResourceNotification
6632 : } MEMORY_RESOURCE_NOTIFICATION_TYPE;
6633 :
6634 : WINBASEAPI
6635 : __out_opt
6636 : HANDLE
6637 : WINAPI
6638 : CreateMemoryResourceNotification(
6639 : __in MEMORY_RESOURCE_NOTIFICATION_TYPE NotificationType
6640 : );
6641 :
6642 : WINBASEAPI
6643 : BOOL
6644 : WINAPI
6645 : QueryMemoryResourceNotification(
6646 : __in HANDLE ResourceNotificationHandle,
6647 : __out PBOOL ResourceState
6648 : );
6649 :
6650 : #endif // _WIN32_WINNT >= 0x0501
6651 :
6652 :
6653 : WINBASEAPI
6654 : __out_opt
6655 : HMODULE
6656 : WINAPI
6657 : LoadLibraryA(
6658 : __in LPCSTR lpLibFileName
6659 : );
6660 : WINBASEAPI
6661 : __out_opt
6662 : HMODULE
6663 : WINAPI
6664 : LoadLibraryW(
6665 : __in LPCWSTR lpLibFileName
6666 : );
6667 : #ifdef UNICODE
6668 : #define LoadLibrary LoadLibraryW
6669 : #else
6670 : #define LoadLibrary LoadLibraryA
6671 : #endif // !UNICODE
6672 :
6673 : WINBASEAPI
6674 : __out_opt
6675 : HMODULE
6676 : WINAPI
6677 : LoadLibraryExA(
6678 : __in LPCSTR lpLibFileName,
6679 : __reserved HANDLE hFile,
6680 : __in DWORD dwFlags
6681 : );
6682 : WINBASEAPI
6683 : __out_opt
6684 : HMODULE
6685 : WINAPI
6686 : LoadLibraryExW(
6687 : __in LPCWSTR lpLibFileName,
6688 : __reserved HANDLE hFile,
6689 : __in DWORD dwFlags
6690 : );
6691 : #ifdef UNICODE
6692 : #define LoadLibraryEx LoadLibraryExW
6693 : #else
6694 : #define LoadLibraryEx LoadLibraryExA
6695 : #endif // !UNICODE
6696 :
6697 :
6698 : #define DONT_RESOLVE_DLL_REFERENCES 0x00000001
6699 : #define LOAD_LIBRARY_AS_DATAFILE 0x00000002
6700 : #define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008
6701 : #define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x00000010
6702 : #define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x00000020
6703 : #define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x00000040
6704 :
6705 : WINBASEAPI
6706 : DWORD
6707 : WINAPI
6708 : GetModuleFileNameA(
6709 : __in_opt HMODULE hModule,
6710 : __out_ecount_part(nSize, return + 1) LPCH lpFilename,
6711 : __in DWORD nSize
6712 : );
6713 : WINBASEAPI
6714 : DWORD
6715 : WINAPI
6716 : GetModuleFileNameW(
6717 : __in_opt HMODULE hModule,
6718 : __out_ecount_part(nSize, return + 1) LPWCH lpFilename,
6719 : __in DWORD nSize
6720 : );
6721 : #ifdef UNICODE
6722 : #define GetModuleFileName GetModuleFileNameW
6723 : #else
6724 : #define GetModuleFileName GetModuleFileNameA
6725 : #endif // !UNICODE
6726 :
6727 : WINBASEAPI
6728 : __out_opt
6729 : HMODULE
6730 : WINAPI
6731 : GetModuleHandleA(
6732 : __in_opt LPCSTR lpModuleName
6733 : );
6734 : WINBASEAPI
6735 : __out_opt
6736 : HMODULE
6737 : WINAPI
6738 : GetModuleHandleW(
6739 : __in_opt LPCWSTR lpModuleName
6740 : );
6741 : #ifdef UNICODE
6742 : #define GetModuleHandle GetModuleHandleW
6743 : #else
6744 : #define GetModuleHandle GetModuleHandleA
6745 : #endif // !UNICODE
6746 :
6747 : #if !defined(RC_INVOKED)
6748 : #if _WIN32_WINNT > 0x0500 || defined(WINBASE_DECLARE_GET_MODULE_HANDLE_EX) || ISOLATION_AWARE_ENABLED
6749 :
6750 : #define GET_MODULE_HANDLE_EX_FLAG_PIN (0x00000001)
6751 : #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT (0x00000002)
6752 : #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS (0x00000004)
6753 :
6754 : typedef
6755 : BOOL
6756 : (WINAPI*
6757 : PGET_MODULE_HANDLE_EXA)(
6758 : __in DWORD dwFlags,
6759 : __in_opt LPCSTR lpModuleName,
6760 : __deref_out HMODULE* phModule
6761 : );
6762 : typedef
6763 : BOOL
6764 : (WINAPI*
6765 : PGET_MODULE_HANDLE_EXW)(
6766 : __in DWORD dwFlags,
6767 : __in_opt LPCWSTR lpModuleName,
6768 : __deref_out HMODULE* phModule
6769 : );
6770 : #ifdef UNICODE
6771 : #define PGET_MODULE_HANDLE_EX PGET_MODULE_HANDLE_EXW
6772 : #else
6773 : #define PGET_MODULE_HANDLE_EX PGET_MODULE_HANDLE_EXA
6774 : #endif // !UNICODE
6775 :
6776 : WINBASEAPI
6777 : BOOL
6778 : WINAPI
6779 : GetModuleHandleExA(
6780 : __in DWORD dwFlags,
6781 : __in_opt LPCSTR lpModuleName,
6782 : __out HMODULE* phModule
6783 : );
6784 : WINBASEAPI
6785 : BOOL
6786 : WINAPI
6787 : GetModuleHandleExW(
6788 : __in DWORD dwFlags,
6789 : __in_opt LPCWSTR lpModuleName,
6790 : __out HMODULE* phModule
6791 : );
6792 : #ifdef UNICODE
6793 : #define GetModuleHandleEx GetModuleHandleExW
6794 : #else
6795 : #define GetModuleHandleEx GetModuleHandleExA
6796 : #endif // !UNICODE
6797 :
6798 : #endif
6799 : #endif
6800 :
6801 : #if _WIN32_WINNT >= 0x0502
6802 :
6803 : WINBASEAPI
6804 : BOOL
6805 : WINAPI
6806 : NeedCurrentDirectoryForExePathA(
6807 : __in LPCSTR ExeName
6808 : );
6809 : WINBASEAPI
6810 : BOOL
6811 : WINAPI
6812 : NeedCurrentDirectoryForExePathW(
6813 : __in LPCWSTR ExeName
6814 : );
6815 : #ifdef UNICODE
6816 : #define NeedCurrentDirectoryForExePath NeedCurrentDirectoryForExePathW
6817 : #else
6818 : #define NeedCurrentDirectoryForExePath NeedCurrentDirectoryForExePathA
6819 : #endif // !UNICODE
6820 :
6821 : #endif
6822 :
6823 : #if _WIN32_WINNT >= 0x0600
6824 :
6825 : #define PROCESS_NAME_NATIVE 0x00000001
6826 :
6827 : WINBASEAPI
6828 : BOOL
6829 : WINAPI
6830 : QueryFullProcessImageNameA(
6831 : __in HANDLE hProcess,
6832 : __in DWORD dwFlags,
6833 : __out_ecount_part(*lpdwSize, *lpdwSize) LPSTR lpExeName,
6834 : __inout PDWORD lpdwSize
6835 : );
6836 : WINBASEAPI
6837 : BOOL
6838 : WINAPI
6839 : QueryFullProcessImageNameW(
6840 : __in HANDLE hProcess,
6841 : __in DWORD dwFlags,
6842 : __out_ecount_part(*lpdwSize, *lpdwSize) LPWSTR lpExeName,
6843 : __inout PDWORD lpdwSize
6844 : );
6845 : #ifdef UNICODE
6846 : #define QueryFullProcessImageName QueryFullProcessImageNameW
6847 : #else
6848 : #define QueryFullProcessImageName QueryFullProcessImageNameA
6849 : #endif // !UNICODE
6850 :
6851 : #endif
6852 :
6853 : //
6854 : // Extended process and thread attribute support
6855 : //
6856 :
6857 : #define PROC_THREAD_ATTRIBUTE_NUMBER 0x0000FFFF
6858 : #define PROC_THREAD_ATTRIBUTE_THREAD 0x00010000 // Attribute may be used with thread creation
6859 : #define PROC_THREAD_ATTRIBUTE_INPUT 0x00020000 // Attribute is input only
6860 : #define PROC_THREAD_ATTRIBUTE_ADDITIVE 0x00040000 // Attribute may be "accumulated," e.g. bitmasks, counters, etc.
6861 :
6862 : typedef enum _PROC_THREAD_ATTRIBUTE_NUM {
6863 : ProcThreadAttributeParentProcess = 0,
6864 : ProcThreadAttributeExtendedFlags,
6865 : ProcThreadAttributeHandleList,
6866 : ProcThreadAttributeMax
6867 : } PROC_THREAD_ATTRIBUTE_NUM;
6868 :
6869 : #define ProcThreadAttributeValue(Number, Thread, Input, Additive) \
6870 : (((Number) & PROC_THREAD_ATTRIBUTE_NUMBER) | \
6871 : ((Thread != FALSE) ? PROC_THREAD_ATTRIBUTE_THREAD : 0) | \
6872 : ((Input != FALSE) ? PROC_THREAD_ATTRIBUTE_INPUT : 0) | \
6873 : ((Additive != FALSE) ? PROC_THREAD_ATTRIBUTE_ADDITIVE : 0))
6874 :
6875 : #define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS \
6876 : ProcThreadAttributeValue (ProcThreadAttributeParentProcess, FALSE, TRUE, FALSE)
6877 : #define PROC_THREAD_ATTRIBUTE_EXTENDED_FLAGS \
6878 : ProcThreadAttributeValue (ProcThreadAttributeExtendedFlags, FALSE, TRUE, TRUE)
6879 : #define PROC_THREAD_ATTRIBUTE_HANDLE_LIST \
6880 : ProcThreadAttributeValue (ProcThreadAttributeHandleList, FALSE, TRUE, FALSE)
6881 :
6882 : typedef struct _PROC_THREAD_ATTRIBUTE_LIST *PPROC_THREAD_ATTRIBUTE_LIST, *LPPROC_THREAD_ATTRIBUTE_LIST;
6883 :
6884 :
6885 : WINBASEAPI
6886 : BOOL
6887 : WINAPI
6888 : InitializeProcThreadAttributeList(
6889 : __out_xcount_opt(*lpSize) LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
6890 : __in DWORD dwAttributeCount,
6891 : __in __reserved DWORD dwFlags,
6892 : __inout PSIZE_T lpSize
6893 : );
6894 :
6895 : WINBASEAPI
6896 : VOID
6897 : WINAPI
6898 : DeleteProcThreadAttributeList(
6899 : __inout LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList
6900 : );
6901 :
6902 : #define PROC_THREAD_ATTRIBUTE_REPLACE_VALUE 0x00000001
6903 :
6904 : WINBASEAPI
6905 : BOOL
6906 : WINAPI
6907 : UpdateProcThreadAttribute(
6908 : __inout LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
6909 : __in DWORD dwFlags,
6910 : __in DWORD_PTR Attribute,
6911 : __in_bcount_opt(cbSize) PVOID lpValue,
6912 : __in SIZE_T cbSize,
6913 : __out_bcount_opt(cbSize) PVOID lpPreviousValue,
6914 : __in_opt PSIZE_T lpReturnSize
6915 : );
6916 :
6917 :
6918 : WINBASEAPI
6919 : BOOL
6920 : WINAPI
6921 : CreateProcessA(
6922 : __in_opt LPCSTR lpApplicationName,
6923 : __inout_opt LPSTR lpCommandLine,
6924 : __in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes,
6925 : __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
6926 : __in BOOL bInheritHandles,
6927 : __in DWORD dwCreationFlags,
6928 : __in_opt LPVOID lpEnvironment,
6929 : __in_opt LPCSTR lpCurrentDirectory,
6930 : __in LPSTARTUPINFOA lpStartupInfo,
6931 : __out LPPROCESS_INFORMATION lpProcessInformation
6932 : );
6933 : WINBASEAPI
6934 : BOOL
6935 : WINAPI
6936 : CreateProcessW(
6937 : __in_opt LPCWSTR lpApplicationName,
6938 : __inout_opt LPWSTR lpCommandLine,
6939 : __in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes,
6940 : __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
6941 : __in BOOL bInheritHandles,
6942 : __in DWORD dwCreationFlags,
6943 : __in_opt LPVOID lpEnvironment,
6944 : __in_opt LPCWSTR lpCurrentDirectory,
6945 : __in LPSTARTUPINFOW lpStartupInfo,
6946 : __out LPPROCESS_INFORMATION lpProcessInformation
6947 : );
6948 : #ifdef UNICODE
6949 : #define CreateProcess CreateProcessW
6950 : #else
6951 : #define CreateProcess CreateProcessA
6952 : #endif // !UNICODE
6953 :
6954 :
6955 :
6956 : WINBASEAPI
6957 : BOOL
6958 : WINAPI
6959 : SetProcessShutdownParameters(
6960 : __in DWORD dwLevel,
6961 : __in DWORD dwFlags
6962 : );
6963 :
6964 : WINBASEAPI
6965 : BOOL
6966 : WINAPI
6967 : GetProcessShutdownParameters(
6968 : __out LPDWORD lpdwLevel,
6969 : __out LPDWORD lpdwFlags
6970 : );
6971 :
6972 : WINBASEAPI
6973 : DWORD
6974 : WINAPI
6975 : GetProcessVersion(
6976 : __in DWORD ProcessId
6977 : );
6978 :
6979 : WINBASEAPI
6980 : VOID
6981 : WINAPI
6982 : FatalAppExitA(
6983 : __in UINT uAction,
6984 : __in LPCSTR lpMessageText
6985 : );
6986 : WINBASEAPI
6987 : VOID
6988 : WINAPI
6989 : FatalAppExitW(
6990 : __in UINT uAction,
6991 : __in LPCWSTR lpMessageText
6992 : );
6993 : #ifdef UNICODE
6994 : #define FatalAppExit FatalAppExitW
6995 : #else
6996 : #define FatalAppExit FatalAppExitA
6997 : #endif // !UNICODE
6998 :
6999 : WINBASEAPI
7000 : VOID
7001 : WINAPI
7002 : GetStartupInfoA(
7003 : __out LPSTARTUPINFOA lpStartupInfo
7004 : );
7005 : WINBASEAPI
7006 : VOID
7007 : WINAPI
7008 : GetStartupInfoW(
7009 : __out LPSTARTUPINFOW lpStartupInfo
7010 : );
7011 : #ifdef UNICODE
7012 : #define GetStartupInfo GetStartupInfoW
7013 : #else
7014 : #define GetStartupInfo GetStartupInfoA
7015 : #endif // !UNICODE
7016 :
7017 : WINBASEAPI
7018 : __out
7019 : LPSTR
7020 : WINAPI
7021 : GetCommandLineA(
7022 : VOID
7023 : );
7024 : WINBASEAPI
7025 : __out
7026 : LPWSTR
7027 : WINAPI
7028 : GetCommandLineW(
7029 : VOID
7030 : );
7031 : #ifdef UNICODE
7032 : #define GetCommandLine GetCommandLineW
7033 : #else
7034 : #define GetCommandLine GetCommandLineA
7035 : #endif // !UNICODE
7036 :
7037 : WINBASEAPI
7038 : __success(return < nSize)
7039 : __success(return != 0)
7040 : DWORD
7041 : WINAPI
7042 : GetEnvironmentVariableA(
7043 : __in_opt LPCSTR lpName,
7044 : __out_ecount_part_opt(nSize, return + 1) LPSTR lpBuffer,
7045 : __in DWORD nSize
7046 : );
7047 : WINBASEAPI
7048 : __success(return < nSize)
7049 : __success(return != 0)
7050 : DWORD
7051 : WINAPI
7052 : GetEnvironmentVariableW(
7053 : __in_opt LPCWSTR lpName,
7054 : __out_ecount_part_opt(nSize, return + 1) LPWSTR lpBuffer,
7055 : __in DWORD nSize
7056 : );
7057 : #ifdef UNICODE
7058 : #define GetEnvironmentVariable GetEnvironmentVariableW
7059 : #else
7060 : #define GetEnvironmentVariable GetEnvironmentVariableA
7061 : #endif // !UNICODE
7062 :
7063 : WINBASEAPI
7064 : BOOL
7065 : WINAPI
7066 : SetEnvironmentVariableA(
7067 : __in LPCSTR lpName,
7068 : __in_opt LPCSTR lpValue
7069 : );
7070 : WINBASEAPI
7071 : BOOL
7072 : WINAPI
7073 : SetEnvironmentVariableW(
7074 : __in LPCWSTR lpName,
7075 : __in_opt LPCWSTR lpValue
7076 : );
7077 : #ifdef UNICODE
7078 : #define SetEnvironmentVariable SetEnvironmentVariableW
7079 : #else
7080 : #define SetEnvironmentVariable SetEnvironmentVariableA
7081 : #endif // !UNICODE
7082 :
7083 : #if defined(_M_CEE)
7084 : #undef SetEnvironmentVariable
7085 : __inline
7086 : BOOL
7087 : SetEnvironmentVariable(
7088 : LPCTSTR lpName,
7089 : LPCTSTR lpValue
7090 : )
7091 : {
7092 : #ifdef UNICODE
7093 : return SetEnvironmentVariableW(
7094 : #else
7095 : return SetEnvironmentVariableA(
7096 : #endif
7097 : lpName,
7098 : lpValue
7099 : );
7100 : }
7101 : #endif /* _M_CEE */
7102 :
7103 : WINBASEAPI
7104 : __success(return <= nSize)
7105 : __success(return != 0)
7106 : DWORD
7107 : WINAPI
7108 : ExpandEnvironmentStringsA(
7109 : __in LPCSTR lpSrc,
7110 : __out_ecount_part_opt(nSize, return) LPSTR lpDst,
7111 : __in DWORD nSize
7112 : );
7113 : WINBASEAPI
7114 : __success(return <= nSize)
7115 : __success(return != 0)
7116 : DWORD
7117 : WINAPI
7118 : ExpandEnvironmentStringsW(
7119 : __in LPCWSTR lpSrc,
7120 : __out_ecount_part_opt(nSize, return) LPWSTR lpDst,
7121 : __in DWORD nSize
7122 : );
7123 : #ifdef UNICODE
7124 : #define ExpandEnvironmentStrings ExpandEnvironmentStringsW
7125 : #else
7126 : #define ExpandEnvironmentStrings ExpandEnvironmentStringsA
7127 : #endif // !UNICODE
7128 :
7129 : WINBASEAPI
7130 : DWORD
7131 : WINAPI
7132 : GetFirmwareEnvironmentVariableA(
7133 : __in LPCSTR lpName,
7134 : __in LPCSTR lpGuid,
7135 : __out_bcount_part_opt(nSize, return) PVOID pBuffer,
7136 : __in DWORD nSize
7137 : );
7138 : WINBASEAPI
7139 : DWORD
7140 : WINAPI
7141 : GetFirmwareEnvironmentVariableW(
7142 : __in LPCWSTR lpName,
7143 : __in LPCWSTR lpGuid,
7144 : __out_bcount_part_opt(nSize, return) PVOID pBuffer,
7145 : __in DWORD nSize
7146 : );
7147 : #ifdef UNICODE
7148 : #define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableW
7149 : #else
7150 : #define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableA
7151 : #endif // !UNICODE
7152 :
7153 : WINBASEAPI
7154 : BOOL
7155 : WINAPI
7156 : SetFirmwareEnvironmentVariableA(
7157 : __in LPCSTR lpName,
7158 : __in LPCSTR lpGuid,
7159 : __in_bcount_opt(nSize) PVOID pValue,
7160 : __in DWORD nSize
7161 : );
7162 : WINBASEAPI
7163 : BOOL
7164 : WINAPI
7165 : SetFirmwareEnvironmentVariableW(
7166 : __in LPCWSTR lpName,
7167 : __in LPCWSTR lpGuid,
7168 : __in_bcount_opt(nSize) PVOID pValue,
7169 : __in DWORD nSize
7170 : );
7171 : #ifdef UNICODE
7172 : #define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableW
7173 : #else
7174 : #define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableA
7175 : #endif // !UNICODE
7176 :
7177 :
7178 : WINBASEAPI
7179 : VOID
7180 : WINAPI
7181 : OutputDebugStringA(
7182 : __in_opt LPCSTR lpOutputString
7183 : );
7184 : WINBASEAPI
7185 : VOID
7186 : WINAPI
7187 : OutputDebugStringW(
7188 : __in_opt LPCWSTR lpOutputString
7189 : );
7190 : #ifdef UNICODE
7191 : #define OutputDebugString OutputDebugStringW
7192 : #else
7193 : #define OutputDebugString OutputDebugStringA
7194 : #endif // !UNICODE
7195 :
7196 : WINBASEAPI
7197 : __out_opt
7198 : HRSRC
7199 : WINAPI
7200 : FindResourceA(
7201 : __in_opt HMODULE hModule,
7202 : __in LPCSTR lpName,
7203 : __in LPCSTR lpType
7204 : );
7205 : WINBASEAPI
7206 : __out_opt
7207 : HRSRC
7208 : WINAPI
7209 : FindResourceW(
7210 : __in_opt HMODULE hModule,
7211 : __in LPCWSTR lpName,
7212 : __in LPCWSTR lpType
7213 : );
7214 : #ifdef UNICODE
7215 : #define FindResource FindResourceW
7216 : #else
7217 : #define FindResource FindResourceA
7218 : #endif // !UNICODE
7219 :
7220 : WINBASEAPI
7221 : __out_opt
7222 : HRSRC
7223 : WINAPI
7224 : FindResourceExA(
7225 : __in_opt HMODULE hModule,
7226 : __in LPCSTR lpType,
7227 : __in LPCSTR lpName,
7228 : __in WORD wLanguage
7229 : );
7230 : WINBASEAPI
7231 : __out_opt
7232 : HRSRC
7233 : WINAPI
7234 : FindResourceExW(
7235 : __in_opt HMODULE hModule,
7236 : __in LPCWSTR lpType,
7237 : __in LPCWSTR lpName,
7238 : __in WORD wLanguage
7239 : );
7240 : #ifdef UNICODE
7241 : #define FindResourceEx FindResourceExW
7242 : #else
7243 : #define FindResourceEx FindResourceExA
7244 : #endif // !UNICODE
7245 :
7246 : #ifdef STRICT
7247 : typedef BOOL (CALLBACK* ENUMRESTYPEPROCA)(__in_opt HMODULE hModule, __in LPSTR lpType,
7248 : __in LONG_PTR lParam);
7249 : typedef BOOL (CALLBACK* ENUMRESTYPEPROCW)(__in_opt HMODULE hModule, __in LPWSTR lpType,
7250 : __in LONG_PTR lParam);
7251 : #ifdef UNICODE
7252 : #define ENUMRESTYPEPROC ENUMRESTYPEPROCW
7253 : #else
7254 : #define ENUMRESTYPEPROC ENUMRESTYPEPROCA
7255 : #endif // !UNICODE
7256 : typedef BOOL (CALLBACK* ENUMRESNAMEPROCA)(__in_opt HMODULE hModule, __in LPCSTR lpType,
7257 : __in LPSTR lpName, __in LONG_PTR lParam);
7258 : typedef BOOL (CALLBACK* ENUMRESNAMEPROCW)(__in_opt HMODULE hModule, __in LPCWSTR lpType,
7259 : __in LPWSTR lpName, __in LONG_PTR lParam);
7260 : #ifdef UNICODE
7261 : #define ENUMRESNAMEPROC ENUMRESNAMEPROCW
7262 : #else
7263 : #define ENUMRESNAMEPROC ENUMRESNAMEPROCA
7264 : #endif // !UNICODE
7265 : typedef BOOL (CALLBACK* ENUMRESLANGPROCA)(__in_opt HMODULE hModule, __in LPCSTR lpType,
7266 : __in LPCSTR lpName, __in WORD wLanguage, __in LONG_PTR lParam);
7267 : typedef BOOL (CALLBACK* ENUMRESLANGPROCW)(__in_opt HMODULE hModule, __in LPCWSTR lpType,
7268 : __in LPCWSTR lpName, __in WORD wLanguage, __in LONG_PTR lParam);
7269 : #ifdef UNICODE
7270 : #define ENUMRESLANGPROC ENUMRESLANGPROCW
7271 : #else
7272 : #define ENUMRESLANGPROC ENUMRESLANGPROCA
7273 : #endif // !UNICODE
7274 : #else
7275 : typedef FARPROC ENUMRESTYPEPROCA;
7276 : typedef FARPROC ENUMRESTYPEPROCW;
7277 : #ifdef UNICODE
7278 : typedef ENUMRESTYPEPROCW ENUMRESTYPEPROC;
7279 : #else
7280 : typedef ENUMRESTYPEPROCA ENUMRESTYPEPROC;
7281 : #endif // UNICODE
7282 : typedef FARPROC ENUMRESNAMEPROCA;
7283 : typedef FARPROC ENUMRESNAMEPROCW;
7284 : #ifdef UNICODE
7285 : typedef ENUMRESNAMEPROCW ENUMRESNAMEPROC;
7286 : #else
7287 : typedef ENUMRESNAMEPROCA ENUMRESNAMEPROC;
7288 : #endif // UNICODE
7289 : typedef FARPROC ENUMRESLANGPROCA;
7290 : typedef FARPROC ENUMRESLANGPROCW;
7291 : #ifdef UNICODE
7292 : typedef ENUMRESLANGPROCW ENUMRESLANGPROC;
7293 : #else
7294 : typedef ENUMRESLANGPROCA ENUMRESLANGPROC;
7295 : #endif // UNICODE
7296 : #endif
7297 :
7298 : WINBASEAPI
7299 : BOOL
7300 : WINAPI
7301 : EnumResourceTypesA(
7302 : __in_opt HMODULE hModule,
7303 : __in ENUMRESTYPEPROCA lpEnumFunc,
7304 : __in LONG_PTR lParam
7305 : );
7306 : WINBASEAPI
7307 : BOOL
7308 : WINAPI
7309 : EnumResourceTypesW(
7310 : __in_opt HMODULE hModule,
7311 : __in ENUMRESTYPEPROCW lpEnumFunc,
7312 : __in LONG_PTR lParam
7313 : );
7314 : #ifdef UNICODE
7315 : #define EnumResourceTypes EnumResourceTypesW
7316 : #else
7317 : #define EnumResourceTypes EnumResourceTypesA
7318 : #endif // !UNICODE
7319 :
7320 : WINBASEAPI
7321 : BOOL
7322 : WINAPI
7323 : EnumResourceNamesA(
7324 : __in_opt HMODULE hModule,
7325 : __in LPCSTR lpType,
7326 : __in ENUMRESNAMEPROCA lpEnumFunc,
7327 : __in LONG_PTR lParam
7328 : );
7329 : WINBASEAPI
7330 : BOOL
7331 : WINAPI
7332 : EnumResourceNamesW(
7333 : __in_opt HMODULE hModule,
7334 : __in LPCWSTR lpType,
7335 : __in ENUMRESNAMEPROCW lpEnumFunc,
7336 : __in LONG_PTR lParam
7337 : );
7338 : #ifdef UNICODE
7339 : #define EnumResourceNames EnumResourceNamesW
7340 : #else
7341 : #define EnumResourceNames EnumResourceNamesA
7342 : #endif // !UNICODE
7343 :
7344 : WINBASEAPI
7345 : BOOL
7346 : WINAPI
7347 : EnumResourceLanguagesA(
7348 : __in_opt HMODULE hModule,
7349 : __in LPCSTR lpType,
7350 : __in LPCSTR lpName,
7351 : __in ENUMRESLANGPROCA lpEnumFunc,
7352 : __in LONG_PTR lParam
7353 : );
7354 : WINBASEAPI
7355 : BOOL
7356 : WINAPI
7357 : EnumResourceLanguagesW(
7358 : __in_opt HMODULE hModule,
7359 : __in LPCWSTR lpType,
7360 : __in LPCWSTR lpName,
7361 : __in ENUMRESLANGPROCW lpEnumFunc,
7362 : __in LONG_PTR lParam
7363 : );
7364 : #ifdef UNICODE
7365 : #define EnumResourceLanguages EnumResourceLanguagesW
7366 : #else
7367 : #define EnumResourceLanguages EnumResourceLanguagesA
7368 : #endif // !UNICODE
7369 :
7370 : #define RESOURCE_ENUM_LN (0x0001)
7371 : #define RESOURCE_ENUM_MUI (0x0002)
7372 : #define RESOURCE_ENUM_MUI_SYSTEM (0x0004)
7373 : #define RESOURCE_UPDATE_LN (0x0010)
7374 : #define RESOURCE_UPDATE_MUI (0x0020)
7375 :
7376 : WINBASEAPI
7377 : BOOL
7378 : WINAPI
7379 : EnumResourceTypesExA(
7380 : __in_opt HMODULE hModule,
7381 : __in ENUMRESTYPEPROCA lpEnumFunc,
7382 : __in LONG_PTR lParam,
7383 : DWORD dwFlags,
7384 : LANGID LangId
7385 : );
7386 : WINBASEAPI
7387 : BOOL
7388 : WINAPI
7389 : EnumResourceTypesExW(
7390 : __in_opt HMODULE hModule,
7391 : __in ENUMRESTYPEPROCW lpEnumFunc,
7392 : __in LONG_PTR lParam,
7393 : DWORD dwFlags,
7394 : LANGID LangId
7395 : );
7396 : #ifdef UNICODE
7397 : #define EnumResourceTypesEx EnumResourceTypesExW
7398 : #else
7399 : #define EnumResourceTypesEx EnumResourceTypesExA
7400 : #endif // !UNICODE
7401 :
7402 :
7403 : WINBASEAPI
7404 : BOOL
7405 : WINAPI
7406 : EnumResourceNamesExA(
7407 : __in_opt HMODULE hModule,
7408 : __in LPCSTR lpType,
7409 : __in ENUMRESNAMEPROCA lpEnumFunc,
7410 : __in LONG_PTR lParam,
7411 : DWORD dwFlags,
7412 : LANGID LangId
7413 : );
7414 : WINBASEAPI
7415 : BOOL
7416 : WINAPI
7417 : EnumResourceNamesExW(
7418 : __in_opt HMODULE hModule,
7419 : __in LPCWSTR lpType,
7420 : __in ENUMRESNAMEPROCW lpEnumFunc,
7421 : __in LONG_PTR lParam,
7422 : DWORD dwFlags,
7423 : LANGID LangId
7424 : );
7425 : #ifdef UNICODE
7426 : #define EnumResourceNamesEx EnumResourceNamesExW
7427 : #else
7428 : #define EnumResourceNamesEx EnumResourceNamesExA
7429 : #endif // !UNICODE
7430 :
7431 : WINBASEAPI
7432 : BOOL
7433 : WINAPI
7434 : EnumResourceLanguagesExA(
7435 : __in_opt HMODULE hModule,
7436 : __in LPCSTR lpType,
7437 : __in LPCSTR lpName,
7438 : __in ENUMRESLANGPROCA lpEnumFunc,
7439 : __in LONG_PTR lParam,
7440 : DWORD dwFlags,
7441 : LANGID LangId
7442 : );
7443 : WINBASEAPI
7444 : BOOL
7445 : WINAPI
7446 : EnumResourceLanguagesExW(
7447 : __in_opt HMODULE hModule,
7448 : __in LPCWSTR lpType,
7449 : __in LPCWSTR lpName,
7450 : __in ENUMRESLANGPROCW lpEnumFunc,
7451 : __in LONG_PTR lParam,
7452 : DWORD dwFlags,
7453 : LANGID LangId
7454 : );
7455 : #ifdef UNICODE
7456 : #define EnumResourceLanguagesEx EnumResourceLanguagesExW
7457 : #else
7458 : #define EnumResourceLanguagesEx EnumResourceLanguagesExA
7459 : #endif // !UNICODE
7460 :
7461 : WINBASEAPI
7462 : HANDLE
7463 : WINAPI
7464 : BeginUpdateResourceA(
7465 : __in LPCSTR pFileName,
7466 : __in BOOL bDeleteExistingResources
7467 : );
7468 : WINBASEAPI
7469 : HANDLE
7470 : WINAPI
7471 : BeginUpdateResourceW(
7472 : __in LPCWSTR pFileName,
7473 : __in BOOL bDeleteExistingResources
7474 : );
7475 : #ifdef UNICODE
7476 : #define BeginUpdateResource BeginUpdateResourceW
7477 : #else
7478 : #define BeginUpdateResource BeginUpdateResourceA
7479 : #endif // !UNICODE
7480 :
7481 : WINBASEAPI
7482 : BOOL
7483 : WINAPI
7484 : UpdateResourceA(
7485 : __in HANDLE hUpdate,
7486 : __in LPCSTR lpType,
7487 : __in LPCSTR lpName,
7488 : __in WORD wLanguage,
7489 : __in_bcount_opt(cb) LPVOID lpData,
7490 : __in DWORD cb
7491 : );
7492 : WINBASEAPI
7493 : BOOL
7494 : WINAPI
7495 : UpdateResourceW(
7496 : __in HANDLE hUpdate,
7497 : __in LPCWSTR lpType,
7498 : __in LPCWSTR lpName,
7499 : __in WORD wLanguage,
7500 : __in_bcount_opt(cb) LPVOID lpData,
7501 : __in DWORD cb
7502 : );
7503 : #ifdef UNICODE
7504 : #define UpdateResource UpdateResourceW
7505 : #else
7506 : #define UpdateResource UpdateResourceA
7507 : #endif // !UNICODE
7508 :
7509 : WINBASEAPI
7510 : BOOL
7511 : WINAPI
7512 : EndUpdateResourceA(
7513 : __in HANDLE hUpdate,
7514 : __in BOOL fDiscard
7515 : );
7516 : WINBASEAPI
7517 : BOOL
7518 : WINAPI
7519 : EndUpdateResourceW(
7520 : __in HANDLE hUpdate,
7521 : __in BOOL fDiscard
7522 : );
7523 : #ifdef UNICODE
7524 : #define EndUpdateResource EndUpdateResourceW
7525 : #else
7526 : #define EndUpdateResource EndUpdateResourceA
7527 : #endif // !UNICODE
7528 :
7529 :
7530 : WINBASEAPI
7531 : ATOM
7532 : WINAPI
7533 : GlobalAddAtomA(
7534 : __in_opt LPCSTR lpString
7535 : );
7536 : WINBASEAPI
7537 : ATOM
7538 : WINAPI
7539 : GlobalAddAtomW(
7540 : __in_opt LPCWSTR lpString
7541 : );
7542 : #ifdef UNICODE
7543 : #define GlobalAddAtom GlobalAddAtomW
7544 : #else
7545 : #define GlobalAddAtom GlobalAddAtomA
7546 : #endif // !UNICODE
7547 :
7548 : WINBASEAPI
7549 : ATOM
7550 : WINAPI
7551 : GlobalFindAtomA(
7552 : __in_opt LPCSTR lpString
7553 : );
7554 : WINBASEAPI
7555 : ATOM
7556 : WINAPI
7557 : GlobalFindAtomW(
7558 : __in_opt LPCWSTR lpString
7559 : );
7560 : #ifdef UNICODE
7561 : #define GlobalFindAtom GlobalFindAtomW
7562 : #else
7563 : #define GlobalFindAtom GlobalFindAtomA
7564 : #endif // !UNICODE
7565 :
7566 : WINBASEAPI
7567 : UINT
7568 : WINAPI
7569 : GlobalGetAtomNameA(
7570 : __in ATOM nAtom,
7571 : __out_ecount_part(nSize, return + 1) LPSTR lpBuffer,
7572 : __in int nSize
7573 : );
7574 : WINBASEAPI
7575 : UINT
7576 : WINAPI
7577 : GlobalGetAtomNameW(
7578 : __in ATOM nAtom,
7579 : __out_ecount_part(nSize, return + 1) LPWSTR lpBuffer,
7580 : __in int nSize
7581 : );
7582 : #ifdef UNICODE
7583 : #define GlobalGetAtomName GlobalGetAtomNameW
7584 : #else
7585 : #define GlobalGetAtomName GlobalGetAtomNameA
7586 : #endif // !UNICODE
7587 :
7588 : WINBASEAPI
7589 : ATOM
7590 : WINAPI
7591 : AddAtomA(
7592 : __in_opt LPCSTR lpString
7593 : );
7594 : WINBASEAPI
7595 : ATOM
7596 : WINAPI
7597 : AddAtomW(
7598 : __in_opt LPCWSTR lpString
7599 : );
7600 : #ifdef UNICODE
7601 : #define AddAtom AddAtomW
7602 : #else
7603 : #define AddAtom AddAtomA
7604 : #endif // !UNICODE
7605 :
7606 : WINBASEAPI
7607 : ATOM
7608 : WINAPI
7609 : FindAtomA(
7610 : __in_opt LPCSTR lpString
7611 : );
7612 : WINBASEAPI
7613 : ATOM
7614 : WINAPI
7615 : FindAtomW(
7616 : __in_opt LPCWSTR lpString
7617 : );
7618 : #ifdef UNICODE
7619 : #define FindAtom FindAtomW
7620 : #else
7621 : #define FindAtom FindAtomA
7622 : #endif // !UNICODE
7623 :
7624 : WINBASEAPI
7625 : UINT
7626 : WINAPI
7627 : GetAtomNameA(
7628 : __in ATOM nAtom,
7629 : __out_ecount_part(nSize, return + 1) LPSTR lpBuffer,
7630 : __in int nSize
7631 : );
7632 : WINBASEAPI
7633 : UINT
7634 : WINAPI
7635 : GetAtomNameW(
7636 : __in ATOM nAtom,
7637 : __out_ecount_part(nSize, return + 1) LPWSTR lpBuffer,
7638 : __in int nSize
7639 : );
7640 : #ifdef UNICODE
7641 : #define GetAtomName GetAtomNameW
7642 : #else
7643 : #define GetAtomName GetAtomNameA
7644 : #endif // !UNICODE
7645 :
7646 : WINBASEAPI
7647 : UINT
7648 : WINAPI
7649 : GetProfileIntA(
7650 : __in LPCSTR lpAppName,
7651 : __in LPCSTR lpKeyName,
7652 : __in INT nDefault
7653 : );
7654 : WINBASEAPI
7655 : UINT
7656 : WINAPI
7657 : GetProfileIntW(
7658 : __in LPCWSTR lpAppName,
7659 : __in LPCWSTR lpKeyName,
7660 : __in INT nDefault
7661 : );
7662 : #ifdef UNICODE
7663 : #define GetProfileInt GetProfileIntW
7664 : #else
7665 : #define GetProfileInt GetProfileIntA
7666 : #endif // !UNICODE
7667 :
7668 : WINBASEAPI
7669 : DWORD
7670 : WINAPI
7671 : GetProfileStringA(
7672 : __in_opt LPCSTR lpAppName,
7673 : __in_opt LPCSTR lpKeyName,
7674 : __in_opt LPCSTR lpDefault,
7675 : __out_ecount_part_opt(nSize, return + 1) LPSTR lpReturnedString,
7676 : __in DWORD nSize
7677 : );
7678 : WINBASEAPI
7679 : DWORD
7680 : WINAPI
7681 : GetProfileStringW(
7682 : __in_opt LPCWSTR lpAppName,
7683 : __in_opt LPCWSTR lpKeyName,
7684 : __in_opt LPCWSTR lpDefault,
7685 : __out_ecount_part_opt(nSize, return + 1) LPWSTR lpReturnedString,
7686 : __in DWORD nSize
7687 : );
7688 : #ifdef UNICODE
7689 : #define GetProfileString GetProfileStringW
7690 : #else
7691 : #define GetProfileString GetProfileStringA
7692 : #endif // !UNICODE
7693 :
7694 : WINBASEAPI
7695 : BOOL
7696 : WINAPI
7697 : WriteProfileStringA(
7698 : __in_opt LPCSTR lpAppName,
7699 : __in_opt LPCSTR lpKeyName,
7700 : __in_opt LPCSTR lpString
7701 : );
7702 : WINBASEAPI
7703 : BOOL
7704 : WINAPI
7705 : WriteProfileStringW(
7706 : __in_opt LPCWSTR lpAppName,
7707 : __in_opt LPCWSTR lpKeyName,
7708 : __in_opt LPCWSTR lpString
7709 : );
7710 : #ifdef UNICODE
7711 : #define WriteProfileString WriteProfileStringW
7712 : #else
7713 : #define WriteProfileString WriteProfileStringA
7714 : #endif // !UNICODE
7715 :
7716 : WINBASEAPI
7717 : DWORD
7718 : WINAPI
7719 : GetProfileSectionA(
7720 : __in LPCSTR lpAppName,
7721 : __out_ecount_part_opt(nSize, return + 1) LPSTR lpReturnedString,
7722 : __in DWORD nSize
7723 : );
7724 : WINBASEAPI
7725 : DWORD
7726 : WINAPI
7727 : GetProfileSectionW(
7728 : __in LPCWSTR lpAppName,
7729 : __out_ecount_part_opt(nSize, return + 1) LPWSTR lpReturnedString,
7730 : __in DWORD nSize
7731 : );
7732 : #ifdef UNICODE
7733 : #define GetProfileSection GetProfileSectionW
7734 : #else
7735 : #define GetProfileSection GetProfileSectionA
7736 : #endif // !UNICODE
7737 :
7738 : WINBASEAPI
7739 : BOOL
7740 : WINAPI
7741 : WriteProfileSectionA(
7742 : __in LPCSTR lpAppName,
7743 : __in LPCSTR lpString
7744 : );
7745 : WINBASEAPI
7746 : BOOL
7747 : WINAPI
7748 : WriteProfileSectionW(
7749 : __in LPCWSTR lpAppName,
7750 : __in LPCWSTR lpString
7751 : );
7752 : #ifdef UNICODE
7753 : #define WriteProfileSection WriteProfileSectionW
7754 : #else
7755 : #define WriteProfileSection WriteProfileSectionA
7756 : #endif // !UNICODE
7757 :
7758 : WINBASEAPI
7759 : UINT
7760 : WINAPI
7761 : GetPrivateProfileIntA(
7762 : __in LPCSTR lpAppName,
7763 : __in LPCSTR lpKeyName,
7764 : __in INT nDefault,
7765 : __in_opt LPCSTR lpFileName
7766 : );
7767 : WINBASEAPI
7768 : UINT
7769 : WINAPI
7770 : GetPrivateProfileIntW(
7771 : __in LPCWSTR lpAppName,
7772 : __in LPCWSTR lpKeyName,
7773 : __in INT nDefault,
7774 : __in_opt LPCWSTR lpFileName
7775 : );
7776 : #ifdef UNICODE
7777 : #define GetPrivateProfileInt GetPrivateProfileIntW
7778 : #else
7779 : #define GetPrivateProfileInt GetPrivateProfileIntA
7780 : #endif // !UNICODE
7781 :
7782 : WINBASEAPI
7783 : DWORD
7784 : WINAPI
7785 : GetPrivateProfileStringA(
7786 : __in_opt LPCSTR lpAppName,
7787 : __in_opt LPCSTR lpKeyName,
7788 : __in_opt LPCSTR lpDefault,
7789 : __out_ecount_part_opt(nSize, return + 1) LPSTR lpReturnedString,
7790 : __in DWORD nSize,
7791 : __in_opt LPCSTR lpFileName
7792 : );
7793 : WINBASEAPI
7794 : DWORD
7795 : WINAPI
7796 : GetPrivateProfileStringW(
7797 : __in_opt LPCWSTR lpAppName,
7798 : __in_opt LPCWSTR lpKeyName,
7799 : __in_opt LPCWSTR lpDefault,
7800 : __out_ecount_part_opt(nSize, return + 1) LPWSTR lpReturnedString,
7801 : __in DWORD nSize,
7802 : __in_opt LPCWSTR lpFileName
7803 : );
7804 : #ifdef UNICODE
7805 : #define GetPrivateProfileString GetPrivateProfileStringW
7806 : #else
7807 : #define GetPrivateProfileString GetPrivateProfileStringA
7808 : #endif // !UNICODE
7809 :
7810 : WINBASEAPI
7811 : BOOL
7812 : WINAPI
7813 : WritePrivateProfileStringA(
7814 : __in_opt LPCSTR lpAppName,
7815 : __in_opt LPCSTR lpKeyName,
7816 : __in_opt LPCSTR lpString,
7817 : __in_opt LPCSTR lpFileName
7818 : );
7819 : WINBASEAPI
7820 : BOOL
7821 : WINAPI
7822 : WritePrivateProfileStringW(
7823 : __in_opt LPCWSTR lpAppName,
7824 : __in_opt LPCWSTR lpKeyName,
7825 : __in_opt LPCWSTR lpString,
7826 : __in_opt LPCWSTR lpFileName
7827 : );
7828 : #ifdef UNICODE
7829 : #define WritePrivateProfileString WritePrivateProfileStringW
7830 : #else
7831 : #define WritePrivateProfileString WritePrivateProfileStringA
7832 : #endif // !UNICODE
7833 :
7834 : WINBASEAPI
7835 : DWORD
7836 : WINAPI
7837 : GetPrivateProfileSectionA(
7838 : __in LPCSTR lpAppName,
7839 : __out_ecount_part_opt(nSize, return + 1) LPSTR lpReturnedString,
7840 : __in DWORD nSize,
7841 : __in_opt LPCSTR lpFileName
7842 : );
7843 : WINBASEAPI
7844 : DWORD
7845 : WINAPI
7846 : GetPrivateProfileSectionW(
7847 : __in LPCWSTR lpAppName,
7848 : __out_ecount_part_opt(nSize, return + 1) LPWSTR lpReturnedString,
7849 : __in DWORD nSize,
7850 : __in_opt LPCWSTR lpFileName
7851 : );
7852 : #ifdef UNICODE
7853 : #define GetPrivateProfileSection GetPrivateProfileSectionW
7854 : #else
7855 : #define GetPrivateProfileSection GetPrivateProfileSectionA
7856 : #endif // !UNICODE
7857 :
7858 : WINBASEAPI
7859 : BOOL
7860 : WINAPI
7861 : WritePrivateProfileSectionA(
7862 : __in LPCSTR lpAppName,
7863 : __in LPCSTR lpString,
7864 : __in_opt LPCSTR lpFileName
7865 : );
7866 : WINBASEAPI
7867 : BOOL
7868 : WINAPI
7869 : WritePrivateProfileSectionW(
7870 : __in LPCWSTR lpAppName,
7871 : __in LPCWSTR lpString,
7872 : __in_opt LPCWSTR lpFileName
7873 : );
7874 : #ifdef UNICODE
7875 : #define WritePrivateProfileSection WritePrivateProfileSectionW
7876 : #else
7877 : #define WritePrivateProfileSection WritePrivateProfileSectionA
7878 : #endif // !UNICODE
7879 :
7880 :
7881 : WINBASEAPI
7882 : DWORD
7883 : WINAPI
7884 : GetPrivateProfileSectionNamesA(
7885 : __out_ecount_part_opt(nSize, return + 1) LPSTR lpszReturnBuffer,
7886 : __in DWORD nSize,
7887 : __in_opt LPCSTR lpFileName
7888 : );
7889 : WINBASEAPI
7890 : DWORD
7891 : WINAPI
7892 : GetPrivateProfileSectionNamesW(
7893 : __out_ecount_part_opt(nSize, return + 1) LPWSTR lpszReturnBuffer,
7894 : __in DWORD nSize,
7895 : __in_opt LPCWSTR lpFileName
7896 : );
7897 : #ifdef UNICODE
7898 : #define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesW
7899 : #else
7900 : #define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesA
7901 : #endif // !UNICODE
7902 :
7903 : WINBASEAPI
7904 : BOOL
7905 : WINAPI
7906 : GetPrivateProfileStructA(
7907 : __in LPCSTR lpszSection,
7908 : __in LPCSTR lpszKey,
7909 : __out_bcount_opt(uSizeStruct) LPVOID lpStruct,
7910 : __in UINT uSizeStruct,
7911 : __in_opt LPCSTR szFile
7912 : );
7913 : WINBASEAPI
7914 : BOOL
7915 : WINAPI
7916 : GetPrivateProfileStructW(
7917 : __in LPCWSTR lpszSection,
7918 : __in LPCWSTR lpszKey,
7919 : __out_bcount_opt(uSizeStruct) LPVOID lpStruct,
7920 : __in UINT uSizeStruct,
7921 : __in_opt LPCWSTR szFile
7922 : );
7923 : #ifdef UNICODE
7924 : #define GetPrivateProfileStruct GetPrivateProfileStructW
7925 : #else
7926 : #define GetPrivateProfileStruct GetPrivateProfileStructA
7927 : #endif // !UNICODE
7928 :
7929 : WINBASEAPI
7930 : BOOL
7931 : WINAPI
7932 : WritePrivateProfileStructA(
7933 : __in LPCSTR lpszSection,
7934 : __in LPCSTR lpszKey,
7935 : __in_bcount_opt(uSizeStruct) LPVOID lpStruct,
7936 : __in UINT uSizeStruct,
7937 : __in_opt LPCSTR szFile
7938 : );
7939 : WINBASEAPI
7940 : BOOL
7941 : WINAPI
7942 : WritePrivateProfileStructW(
7943 : __in LPCWSTR lpszSection,
7944 : __in LPCWSTR lpszKey,
7945 : __in_bcount_opt(uSizeStruct) LPVOID lpStruct,
7946 : __in UINT uSizeStruct,
7947 : __in_opt LPCWSTR szFile
7948 : );
7949 : #ifdef UNICODE
7950 : #define WritePrivateProfileStruct WritePrivateProfileStructW
7951 : #else
7952 : #define WritePrivateProfileStruct WritePrivateProfileStructA
7953 : #endif // !UNICODE
7954 :
7955 :
7956 : WINBASEAPI
7957 : UINT
7958 : WINAPI
7959 : GetDriveTypeA(
7960 : __in_opt LPCSTR lpRootPathName
7961 : );
7962 : WINBASEAPI
7963 : UINT
7964 : WINAPI
7965 : GetDriveTypeW(
7966 : __in_opt LPCWSTR lpRootPathName
7967 : );
7968 : #ifdef UNICODE
7969 : #define GetDriveType GetDriveTypeW
7970 : #else
7971 : #define GetDriveType GetDriveTypeA
7972 : #endif // !UNICODE
7973 :
7974 : WINBASEAPI
7975 : UINT
7976 : WINAPI
7977 : GetSystemDirectoryA(
7978 : __out_ecount_part_opt(uSize, return + 1) LPSTR lpBuffer,
7979 : __in UINT uSize
7980 : );
7981 : WINBASEAPI
7982 : UINT
7983 : WINAPI
7984 : GetSystemDirectoryW(
7985 : __out_ecount_part_opt(uSize, return + 1) LPWSTR lpBuffer,
7986 : __in UINT uSize
7987 : );
7988 : #ifdef UNICODE
7989 : #define GetSystemDirectory GetSystemDirectoryW
7990 : #else
7991 : #define GetSystemDirectory GetSystemDirectoryA
7992 : #endif // !UNICODE
7993 :
7994 : WINBASEAPI
7995 : DWORD
7996 : WINAPI
7997 : GetTempPathA(
7998 : __in DWORD nBufferLength,
7999 : __out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer
8000 : );
8001 : WINBASEAPI
8002 : DWORD
8003 : WINAPI
8004 : GetTempPathW(
8005 : __in DWORD nBufferLength,
8006 : __out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer
8007 : );
8008 : #ifdef UNICODE
8009 : #define GetTempPath GetTempPathW
8010 : #else
8011 : #define GetTempPath GetTempPathA
8012 : #endif // !UNICODE
8013 :
8014 : WINBASEAPI
8015 : UINT
8016 : WINAPI
8017 : GetTempFileNameA(
8018 : __in LPCSTR lpPathName,
8019 : __in LPCSTR lpPrefixString,
8020 : __in UINT uUnique,
8021 : __out_ecount(MAX_PATH) LPSTR lpTempFileName
8022 : );
8023 : WINBASEAPI
8024 : UINT
8025 : WINAPI
8026 : GetTempFileNameW(
8027 : __in LPCWSTR lpPathName,
8028 : __in LPCWSTR lpPrefixString,
8029 : __in UINT uUnique,
8030 : __out_ecount(MAX_PATH) LPWSTR lpTempFileName
8031 : );
8032 : #ifdef UNICODE
8033 : #define GetTempFileName GetTempFileNameW
8034 : #else
8035 : #define GetTempFileName GetTempFileNameA
8036 : #endif // !UNICODE
8037 :
8038 : #if defined(_M_CEE)
8039 : #undef GetTempFileName
8040 : __inline
8041 : UINT
8042 : GetTempFileName(
8043 : LPCTSTR lpPathName,
8044 : LPCTSTR lpPrefixString,
8045 : UINT uUnique,
8046 : LPTSTR lpTempFileName
8047 : )
8048 : {
8049 : #ifdef UNICODE
8050 : return GetTempFileNameW(
8051 : #else
8052 : return GetTempFileNameA(
8053 : #endif
8054 : lpPathName,
8055 : lpPrefixString,
8056 : uUnique,
8057 : lpTempFileName
8058 : );
8059 : }
8060 : #endif /* _M_CEE */
8061 :
8062 : WINBASEAPI
8063 : UINT
8064 : WINAPI
8065 : GetWindowsDirectoryA(
8066 : __out_ecount_part_opt(uSize, return + 1) LPSTR lpBuffer,
8067 : __in UINT uSize
8068 : );
8069 : WINBASEAPI
8070 : UINT
8071 : WINAPI
8072 : GetWindowsDirectoryW(
8073 : __out_ecount_part_opt(uSize, return + 1) LPWSTR lpBuffer,
8074 : __in UINT uSize
8075 : );
8076 : #ifdef UNICODE
8077 : #define GetWindowsDirectory GetWindowsDirectoryW
8078 : #else
8079 : #define GetWindowsDirectory GetWindowsDirectoryA
8080 : #endif // !UNICODE
8081 :
8082 : WINBASEAPI
8083 : UINT
8084 : WINAPI
8085 : GetSystemWindowsDirectoryA(
8086 : __out_ecount_part_opt(uSize, return + 1) LPSTR lpBuffer,
8087 : __in UINT uSize
8088 : );
8089 : WINBASEAPI
8090 : UINT
8091 : WINAPI
8092 : GetSystemWindowsDirectoryW(
8093 : __out_ecount_part_opt(uSize, return + 1) LPWSTR lpBuffer,
8094 : __in UINT uSize
8095 : );
8096 : #ifdef UNICODE
8097 : #define GetSystemWindowsDirectory GetSystemWindowsDirectoryW
8098 : #else
8099 : #define GetSystemWindowsDirectory GetSystemWindowsDirectoryA
8100 : #endif // !UNICODE
8101 :
8102 : #if !defined(RC_INVOKED) // RC warns because "WINBASE_DECLARE_GET_SYSTEM_WOW64_DIRECTORY" is a bit long.
8103 : #if _WIN32_WINNT >= 0x0501 || defined(WINBASE_DECLARE_GET_SYSTEM_WOW64_DIRECTORY)
8104 :
8105 : WINBASEAPI
8106 : UINT
8107 : WINAPI
8108 : GetSystemWow64DirectoryA(
8109 : __out_ecount_part_opt(uSize, return + 1) LPSTR lpBuffer,
8110 : __in UINT uSize
8111 : );
8112 : WINBASEAPI
8113 : UINT
8114 : WINAPI
8115 : GetSystemWow64DirectoryW(
8116 : __out_ecount_part_opt(uSize, return + 1) LPWSTR lpBuffer,
8117 : __in UINT uSize
8118 : );
8119 : #ifdef UNICODE
8120 : #define GetSystemWow64Directory GetSystemWow64DirectoryW
8121 : #else
8122 : #define GetSystemWow64Directory GetSystemWow64DirectoryA
8123 : #endif // !UNICODE
8124 :
8125 : WINBASEAPI
8126 : BOOLEAN
8127 : WINAPI
8128 : Wow64EnableWow64FsRedirection (
8129 : __in BOOLEAN Wow64FsEnableRedirection
8130 : );
8131 :
8132 : WINBASEAPI
8133 : BOOL
8134 : WINAPI
8135 : Wow64DisableWow64FsRedirection (
8136 : __out PVOID *OldValue
8137 : );
8138 :
8139 : WINBASEAPI
8140 : BOOL
8141 : WINAPI
8142 : Wow64RevertWow64FsRedirection (
8143 : __in PVOID OlValue
8144 : );
8145 :
8146 :
8147 : //
8148 : // for GetProcAddress
8149 : //
8150 : typedef UINT (WINAPI* PGET_SYSTEM_WOW64_DIRECTORY_A)(__out_ecount_part_opt(uSize, return + 1) LPSTR lpBuffer, __in UINT uSize);
8151 : typedef UINT (WINAPI* PGET_SYSTEM_WOW64_DIRECTORY_W)(__out_ecount_part_opt(uSize, return + 1) LPWSTR lpBuffer, __in UINT uSize);
8152 :
8153 : //
8154 : // GetProcAddress only accepts GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A,
8155 : // GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A, GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A.
8156 : // The others are if you want to use the strings in some other way.
8157 : //
8158 : #define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A "GetSystemWow64DirectoryA"
8159 : #define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W L"GetSystemWow64DirectoryA"
8160 : #define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T TEXT("GetSystemWow64DirectoryA")
8161 : #define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A "GetSystemWow64DirectoryW"
8162 : #define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W L"GetSystemWow64DirectoryW"
8163 : #define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T TEXT("GetSystemWow64DirectoryW")
8164 :
8165 : #ifdef UNICODE
8166 : #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A
8167 : #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W
8168 : #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T
8169 : #else
8170 : #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A
8171 : #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W
8172 : #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T
8173 : #endif
8174 :
8175 : #endif // _WIN32_WINNT >= 0x0501
8176 : #endif
8177 :
8178 : WINBASEAPI
8179 : BOOL
8180 : WINAPI
8181 : SetCurrentDirectoryA(
8182 : __in LPCSTR lpPathName
8183 : );
8184 : WINBASEAPI
8185 : BOOL
8186 : WINAPI
8187 : SetCurrentDirectoryW(
8188 : __in LPCWSTR lpPathName
8189 : );
8190 : #ifdef UNICODE
8191 : #define SetCurrentDirectory SetCurrentDirectoryW
8192 : #else
8193 : #define SetCurrentDirectory SetCurrentDirectoryA
8194 : #endif // !UNICODE
8195 :
8196 : #if defined(_M_CEE)
8197 : #undef SetCurrentDirectory
8198 : __inline
8199 : BOOL
8200 : SetCurrentDirectory(
8201 : LPCTSTR lpPathName
8202 : )
8203 : {
8204 : #ifdef UNICODE
8205 : return SetCurrentDirectoryW(
8206 : #else
8207 : return SetCurrentDirectoryA(
8208 : #endif
8209 : lpPathName
8210 : );
8211 : }
8212 : #endif /* _M_CEE */
8213 :
8214 : WINBASEAPI
8215 : DWORD
8216 : WINAPI
8217 : GetCurrentDirectoryA(
8218 : __in DWORD nBufferLength,
8219 : __out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer
8220 : );
8221 : WINBASEAPI
8222 : DWORD
8223 : WINAPI
8224 : GetCurrentDirectoryW(
8225 : __in DWORD nBufferLength,
8226 : __out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer
8227 : );
8228 : #ifdef UNICODE
8229 : #define GetCurrentDirectory GetCurrentDirectoryW
8230 : #else
8231 : #define GetCurrentDirectory GetCurrentDirectoryA
8232 : #endif // !UNICODE
8233 :
8234 : #if _WIN32_WINNT >= 0x0502
8235 :
8236 : WINBASEAPI
8237 : BOOL
8238 : WINAPI
8239 : SetDllDirectoryA(
8240 : __in_opt LPCSTR lpPathName
8241 : );
8242 : WINBASEAPI
8243 : BOOL
8244 : WINAPI
8245 : SetDllDirectoryW(
8246 : __in_opt LPCWSTR lpPathName
8247 : );
8248 : #ifdef UNICODE
8249 : #define SetDllDirectory SetDllDirectoryW
8250 : #else
8251 : #define SetDllDirectory SetDllDirectoryA
8252 : #endif // !UNICODE
8253 :
8254 : WINBASEAPI
8255 : DWORD
8256 : WINAPI
8257 : GetDllDirectoryA(
8258 : __in DWORD nBufferLength,
8259 : __out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer
8260 : );
8261 : WINBASEAPI
8262 : DWORD
8263 : WINAPI
8264 : GetDllDirectoryW(
8265 : __in DWORD nBufferLength,
8266 : __out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer
8267 : );
8268 : #ifdef UNICODE
8269 : #define GetDllDirectory GetDllDirectoryW
8270 : #else
8271 : #define GetDllDirectory GetDllDirectoryA
8272 : #endif // !UNICODE
8273 :
8274 : #endif // _WIN32_WINNT >= 0x0502
8275 :
8276 : WINBASEAPI
8277 : BOOL
8278 : WINAPI
8279 : GetDiskFreeSpaceA(
8280 : __in_opt LPCSTR lpRootPathName,
8281 : __out_opt LPDWORD lpSectorsPerCluster,
8282 : __out_opt LPDWORD lpBytesPerSector,
8283 : __out_opt LPDWORD lpNumberOfFreeClusters,
8284 : __out_opt LPDWORD lpTotalNumberOfClusters
8285 : );
8286 : WINBASEAPI
8287 : BOOL
8288 : WINAPI
8289 : GetDiskFreeSpaceW(
8290 : __in_opt LPCWSTR lpRootPathName,
8291 : __out_opt LPDWORD lpSectorsPerCluster,
8292 : __out_opt LPDWORD lpBytesPerSector,
8293 : __out_opt LPDWORD lpNumberOfFreeClusters,
8294 : __out_opt LPDWORD lpTotalNumberOfClusters
8295 : );
8296 : #ifdef UNICODE
8297 : #define GetDiskFreeSpace GetDiskFreeSpaceW
8298 : #else
8299 : #define GetDiskFreeSpace GetDiskFreeSpaceA
8300 : #endif // !UNICODE
8301 :
8302 : WINBASEAPI
8303 : BOOL
8304 : WINAPI
8305 : GetDiskFreeSpaceExA(
8306 : __in_opt LPCSTR lpDirectoryName,
8307 : __out_opt PULARGE_INTEGER lpFreeBytesAvailableToCaller,
8308 : __out_opt PULARGE_INTEGER lpTotalNumberOfBytes,
8309 : __out_opt PULARGE_INTEGER lpTotalNumberOfFreeBytes
8310 : );
8311 : WINBASEAPI
8312 : BOOL
8313 : WINAPI
8314 : GetDiskFreeSpaceExW(
8315 : __in_opt LPCWSTR lpDirectoryName,
8316 : __out_opt PULARGE_INTEGER lpFreeBytesAvailableToCaller,
8317 : __out_opt PULARGE_INTEGER lpTotalNumberOfBytes,
8318 : __out_opt PULARGE_INTEGER lpTotalNumberOfFreeBytes
8319 : );
8320 : #ifdef UNICODE
8321 : #define GetDiskFreeSpaceEx GetDiskFreeSpaceExW
8322 : #else
8323 : #define GetDiskFreeSpaceEx GetDiskFreeSpaceExA
8324 : #endif // !UNICODE
8325 :
8326 : WINBASEAPI
8327 : BOOL
8328 : WINAPI
8329 : CreateDirectoryA(
8330 : __in LPCSTR lpPathName,
8331 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
8332 : );
8333 : WINBASEAPI
8334 : BOOL
8335 : WINAPI
8336 : CreateDirectoryW(
8337 : __in LPCWSTR lpPathName,
8338 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
8339 : );
8340 : #ifdef UNICODE
8341 : #define CreateDirectory CreateDirectoryW
8342 : #else
8343 : #define CreateDirectory CreateDirectoryA
8344 : #endif // !UNICODE
8345 :
8346 : #if defined(_M_CEE)
8347 : #undef CreateDirectory
8348 : __inline
8349 : BOOL
8350 : CreateDirectory(
8351 : LPCTSTR lpPathName,
8352 : LPSECURITY_ATTRIBUTES lpSecurityAttributes
8353 : )
8354 : {
8355 : #ifdef UNICODE
8356 : return CreateDirectoryW(
8357 : #else
8358 : return CreateDirectoryA(
8359 : #endif
8360 : lpPathName,
8361 : lpSecurityAttributes
8362 : );
8363 : }
8364 : #endif /* _M_CEE */
8365 :
8366 : WINBASEAPI
8367 : BOOL
8368 : WINAPI
8369 : CreateDirectoryExA(
8370 : __in LPCSTR lpTemplateDirectory,
8371 : __in LPCSTR lpNewDirectory,
8372 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
8373 : );
8374 : WINBASEAPI
8375 : BOOL
8376 : WINAPI
8377 : CreateDirectoryExW(
8378 : __in LPCWSTR lpTemplateDirectory,
8379 : __in LPCWSTR lpNewDirectory,
8380 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
8381 : );
8382 : #ifdef UNICODE
8383 : #define CreateDirectoryEx CreateDirectoryExW
8384 : #else
8385 : #define CreateDirectoryEx CreateDirectoryExA
8386 : #endif // !UNICODE
8387 :
8388 : #if _WIN32_WINNT >= 0x0600
8389 :
8390 : WINBASEAPI
8391 : BOOL
8392 : WINAPI
8393 : CreateDirectoryTransactedA(
8394 : __in LPCSTR lpTemplateDirectory,
8395 : __in LPCSTR lpNewDirectory,
8396 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
8397 : __in HANDLE hTransaction
8398 : );
8399 : WINBASEAPI
8400 : BOOL
8401 : WINAPI
8402 : CreateDirectoryTransactedW(
8403 : __in LPCWSTR lpTemplateDirectory,
8404 : __in LPCWSTR lpNewDirectory,
8405 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
8406 : __in HANDLE hTransaction
8407 : );
8408 : #ifdef UNICODE
8409 : #define CreateDirectoryTransacted CreateDirectoryTransactedW
8410 : #else
8411 : #define CreateDirectoryTransacted CreateDirectoryTransactedA
8412 : #endif // !UNICODE
8413 :
8414 : #endif // _WIN32_WINNT >= 0x0600
8415 :
8416 : WINBASEAPI
8417 : BOOL
8418 : WINAPI
8419 : RemoveDirectoryA(
8420 : __in LPCSTR lpPathName
8421 : );
8422 : WINBASEAPI
8423 : BOOL
8424 : WINAPI
8425 : RemoveDirectoryW(
8426 : __in LPCWSTR lpPathName
8427 : );
8428 : #ifdef UNICODE
8429 : #define RemoveDirectory RemoveDirectoryW
8430 : #else
8431 : #define RemoveDirectory RemoveDirectoryA
8432 : #endif // !UNICODE
8433 :
8434 : #if _WIN32_WINNT >= 0x0600
8435 :
8436 : WINBASEAPI
8437 : BOOL
8438 : WINAPI
8439 : RemoveDirectoryTransactedA(
8440 : __in LPCSTR lpPathName,
8441 : __in HANDLE hTransaction
8442 : );
8443 : WINBASEAPI
8444 : BOOL
8445 : WINAPI
8446 : RemoveDirectoryTransactedW(
8447 : __in LPCWSTR lpPathName,
8448 : __in HANDLE hTransaction
8449 : );
8450 : #ifdef UNICODE
8451 : #define RemoveDirectoryTransacted RemoveDirectoryTransactedW
8452 : #else
8453 : #define RemoveDirectoryTransacted RemoveDirectoryTransactedA
8454 : #endif // !UNICODE
8455 :
8456 : #endif // _WIN32_WINNT >= 0x0600
8457 :
8458 : WINBASEAPI
8459 : DWORD
8460 : WINAPI
8461 : GetFullPathNameA(
8462 : __in LPCSTR lpFileName,
8463 : __in DWORD nBufferLength,
8464 : __out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer,
8465 : __deref_opt_out LPSTR *lpFilePart
8466 : );
8467 : WINBASEAPI
8468 : DWORD
8469 : WINAPI
8470 : GetFullPathNameW(
8471 : __in LPCWSTR lpFileName,
8472 : __in DWORD nBufferLength,
8473 : __out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer,
8474 : __deref_opt_out LPWSTR *lpFilePart
8475 : );
8476 : #ifdef UNICODE
8477 : #define GetFullPathName GetFullPathNameW
8478 : #else
8479 : #define GetFullPathName GetFullPathNameA
8480 : #endif // !UNICODE
8481 : #if _WIN32_WINNT >= 0x0600
8482 :
8483 : WINBASEAPI
8484 : DWORD
8485 : WINAPI
8486 : GetFullPathNameTransactedA(
8487 : __in LPCSTR lpFileName,
8488 : __in DWORD nBufferLength,
8489 : __out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer,
8490 : __deref_opt_out LPSTR *lpFilePart,
8491 : __in HANDLE hTransaction
8492 : );
8493 : WINBASEAPI
8494 : DWORD
8495 : WINAPI
8496 : GetFullPathNameTransactedW(
8497 : __in LPCWSTR lpFileName,
8498 : __in DWORD nBufferLength,
8499 : __out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer,
8500 : __deref_opt_out LPWSTR *lpFilePart,
8501 : __in HANDLE hTransaction
8502 : );
8503 : #ifdef UNICODE
8504 : #define GetFullPathNameTransacted GetFullPathNameTransactedW
8505 : #else
8506 : #define GetFullPathNameTransacted GetFullPathNameTransactedA
8507 : #endif // !UNICODE
8508 :
8509 : #endif // _WIN32_WINNT >= 0x0600
8510 :
8511 : #define DDD_RAW_TARGET_PATH 0x00000001
8512 : #define DDD_REMOVE_DEFINITION 0x00000002
8513 : #define DDD_EXACT_MATCH_ON_REMOVE 0x00000004
8514 : #define DDD_NO_BROADCAST_SYSTEM 0x00000008
8515 : #define DDD_LUID_BROADCAST_DRIVE 0x00000010
8516 :
8517 : WINBASEAPI
8518 : BOOL
8519 : WINAPI
8520 : DefineDosDeviceA(
8521 : __in DWORD dwFlags,
8522 : __in LPCSTR lpDeviceName,
8523 : __in_opt LPCSTR lpTargetPath
8524 : );
8525 : WINBASEAPI
8526 : BOOL
8527 : WINAPI
8528 : DefineDosDeviceW(
8529 : __in DWORD dwFlags,
8530 : __in LPCWSTR lpDeviceName,
8531 : __in_opt LPCWSTR lpTargetPath
8532 : );
8533 : #ifdef UNICODE
8534 : #define DefineDosDevice DefineDosDeviceW
8535 : #else
8536 : #define DefineDosDevice DefineDosDeviceA
8537 : #endif // !UNICODE
8538 :
8539 : WINBASEAPI
8540 : DWORD
8541 : WINAPI
8542 : QueryDosDeviceA(
8543 : __in_opt LPCSTR lpDeviceName,
8544 : __out_ecount_part_opt(ucchMax, return) LPSTR lpTargetPath,
8545 : __in DWORD ucchMax
8546 : );
8547 : WINBASEAPI
8548 : DWORD
8549 : WINAPI
8550 : QueryDosDeviceW(
8551 : __in_opt LPCWSTR lpDeviceName,
8552 : __out_ecount_part_opt(ucchMax, return) LPWSTR lpTargetPath,
8553 : __in DWORD ucchMax
8554 : );
8555 : #ifdef UNICODE
8556 : #define QueryDosDevice QueryDosDeviceW
8557 : #else
8558 : #define QueryDosDevice QueryDosDeviceA
8559 : #endif // !UNICODE
8560 :
8561 : #define EXPAND_LOCAL_DRIVES
8562 :
8563 : WINBASEAPI
8564 : __out
8565 : HANDLE
8566 : WINAPI
8567 : CreateFileA(
8568 : __in LPCSTR lpFileName,
8569 : __in DWORD dwDesiredAccess,
8570 : __in DWORD dwShareMode,
8571 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
8572 : __in DWORD dwCreationDisposition,
8573 : __in DWORD dwFlagsAndAttributes,
8574 : __in_opt HANDLE hTemplateFile
8575 : );
8576 : WINBASEAPI
8577 : __out
8578 : HANDLE
8579 : WINAPI
8580 : CreateFileW(
8581 : __in LPCWSTR lpFileName,
8582 : __in DWORD dwDesiredAccess,
8583 : __in DWORD dwShareMode,
8584 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
8585 : __in DWORD dwCreationDisposition,
8586 : __in DWORD dwFlagsAndAttributes,
8587 : __in_opt HANDLE hTemplateFile
8588 : );
8589 : #ifdef UNICODE
8590 : #define CreateFile CreateFileW
8591 : #else
8592 : #define CreateFile CreateFileA
8593 : #endif // !UNICODE
8594 :
8595 : #if _WIN32_WINNT >= 0x0600
8596 :
8597 : WINBASEAPI
8598 : __out
8599 : HANDLE
8600 : WINAPI
8601 : CreateFileTransactedA(
8602 : __in LPCSTR lpFileName,
8603 : __in DWORD dwDesiredAccess,
8604 : __in DWORD dwShareMode,
8605 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
8606 : __in DWORD dwCreationDisposition,
8607 : __in DWORD dwFlagsAndAttributes,
8608 : __in_opt HANDLE hTemplateFile,
8609 : __in HANDLE hTransaction,
8610 : __in_opt PUSHORT pusMiniVersion,
8611 : __reserved PVOID lpExtendedParameter
8612 : );
8613 : WINBASEAPI
8614 : __out
8615 : HANDLE
8616 : WINAPI
8617 : CreateFileTransactedW(
8618 : __in LPCWSTR lpFileName,
8619 : __in DWORD dwDesiredAccess,
8620 : __in DWORD dwShareMode,
8621 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
8622 : __in DWORD dwCreationDisposition,
8623 : __in DWORD dwFlagsAndAttributes,
8624 : __in_opt HANDLE hTemplateFile,
8625 : __in HANDLE hTransaction,
8626 : __in_opt PUSHORT pusMiniVersion,
8627 : __reserved PVOID lpExtendedParameter
8628 : );
8629 : #ifdef UNICODE
8630 : #define CreateFileTransacted CreateFileTransactedW
8631 : #else
8632 : #define CreateFileTransacted CreateFileTransactedA
8633 : #endif // !UNICODE
8634 :
8635 : #endif // _WIN32_WINNT >= 0x0600
8636 :
8637 :
8638 : #if _WIN32_WINNT >= 0x0502
8639 :
8640 : WINBASEAPI
8641 : __out
8642 : HANDLE
8643 : WINAPI
8644 : ReOpenFile(
8645 : __in HANDLE hOriginalFile,
8646 : __in DWORD dwDesiredAccess,
8647 : __in DWORD dwShareMode,
8648 : __in DWORD dwFlagsAndAttributes
8649 : );
8650 :
8651 : #endif // _WIN32_WINNT >= 0x0502
8652 :
8653 : WINBASEAPI
8654 : BOOL
8655 : WINAPI
8656 : SetFileAttributesA(
8657 : __in LPCSTR lpFileName,
8658 : __in DWORD dwFileAttributes
8659 : );
8660 : WINBASEAPI
8661 : BOOL
8662 : WINAPI
8663 : SetFileAttributesW(
8664 : __in LPCWSTR lpFileName,
8665 : __in DWORD dwFileAttributes
8666 : );
8667 : #ifdef UNICODE
8668 : #define SetFileAttributes SetFileAttributesW
8669 : #else
8670 : #define SetFileAttributes SetFileAttributesA
8671 : #endif // !UNICODE
8672 :
8673 : WINBASEAPI
8674 : DWORD
8675 : WINAPI
8676 : GetFileAttributesA(
8677 : __in LPCSTR lpFileName
8678 : );
8679 : WINBASEAPI
8680 : DWORD
8681 : WINAPI
8682 : GetFileAttributesW(
8683 : __in LPCWSTR lpFileName
8684 : );
8685 : #ifdef UNICODE
8686 : #define GetFileAttributes GetFileAttributesW
8687 : #else
8688 : #define GetFileAttributes GetFileAttributesA
8689 : #endif // !UNICODE
8690 :
8691 : #if _WIN32_WINNT >= 0x0600
8692 :
8693 : WINBASEAPI
8694 : BOOL
8695 : WINAPI
8696 : SetFileAttributesTransactedA(
8697 : __in LPCSTR lpFileName,
8698 : __in DWORD dwFileAttributes,
8699 : __in HANDLE hTransaction
8700 : );
8701 : WINBASEAPI
8702 : BOOL
8703 : WINAPI
8704 : SetFileAttributesTransactedW(
8705 : __in LPCWSTR lpFileName,
8706 : __in DWORD dwFileAttributes,
8707 : __in HANDLE hTransaction
8708 : );
8709 : #ifdef UNICODE
8710 : #define SetFileAttributesTransacted SetFileAttributesTransactedW
8711 : #else
8712 : #define SetFileAttributesTransacted SetFileAttributesTransactedA
8713 : #endif // !UNICODE
8714 :
8715 : #endif // _WIN32_WINNT >= 0x0600
8716 :
8717 : typedef enum _GET_FILEEX_INFO_LEVELS {
8718 : GetFileExInfoStandard,
8719 : GetFileExMaxInfoLevel
8720 : } GET_FILEEX_INFO_LEVELS;
8721 :
8722 : #if _WIN32_WINNT >= 0x0600
8723 :
8724 : WINBASEAPI
8725 : BOOL
8726 : WINAPI
8727 : GetFileAttributesTransactedA(
8728 : __in LPCSTR lpFileName,
8729 : __in GET_FILEEX_INFO_LEVELS fInfoLevelId,
8730 : __out LPVOID lpFileInformation,
8731 : __in HANDLE hTransaction
8732 : );
8733 : WINBASEAPI
8734 : BOOL
8735 : WINAPI
8736 : GetFileAttributesTransactedW(
8737 : __in LPCWSTR lpFileName,
8738 : __in GET_FILEEX_INFO_LEVELS fInfoLevelId,
8739 : __out LPVOID lpFileInformation,
8740 : __in HANDLE hTransaction
8741 : );
8742 : #ifdef UNICODE
8743 : #define GetFileAttributesTransacted GetFileAttributesTransactedW
8744 : #else
8745 : #define GetFileAttributesTransacted GetFileAttributesTransactedA
8746 : #endif // !UNICODE
8747 :
8748 : #endif // _WIN32_WINNT >= 0x0600
8749 :
8750 : WINBASEAPI
8751 : BOOL
8752 : WINAPI
8753 : GetFileAttributesExA(
8754 : __in LPCSTR lpFileName,
8755 : __in GET_FILEEX_INFO_LEVELS fInfoLevelId,
8756 : __out LPVOID lpFileInformation
8757 : );
8758 : WINBASEAPI
8759 : BOOL
8760 : WINAPI
8761 : GetFileAttributesExW(
8762 : __in LPCWSTR lpFileName,
8763 : __in GET_FILEEX_INFO_LEVELS fInfoLevelId,
8764 : __out LPVOID lpFileInformation
8765 : );
8766 : #ifdef UNICODE
8767 : #define GetFileAttributesEx GetFileAttributesExW
8768 : #else
8769 : #define GetFileAttributesEx GetFileAttributesExA
8770 : #endif // !UNICODE
8771 :
8772 : WINBASEAPI
8773 : DWORD
8774 : WINAPI
8775 : GetCompressedFileSizeA(
8776 : __in LPCSTR lpFileName,
8777 : __out_opt LPDWORD lpFileSizeHigh
8778 : );
8779 : WINBASEAPI
8780 : DWORD
8781 : WINAPI
8782 : GetCompressedFileSizeW(
8783 : __in LPCWSTR lpFileName,
8784 : __out_opt LPDWORD lpFileSizeHigh
8785 : );
8786 : #ifdef UNICODE
8787 : #define GetCompressedFileSize GetCompressedFileSizeW
8788 : #else
8789 : #define GetCompressedFileSize GetCompressedFileSizeA
8790 : #endif // !UNICODE
8791 :
8792 : #if _WIN32_WINNT >= 0x0600
8793 :
8794 : WINBASEAPI
8795 : DWORD
8796 : WINAPI
8797 : GetCompressedFileSizeTransactedA(
8798 : __in LPCSTR lpFileName,
8799 : __out_opt LPDWORD lpFileSizeHigh,
8800 : __in HANDLE hTransaction
8801 : );
8802 : WINBASEAPI
8803 : DWORD
8804 : WINAPI
8805 : GetCompressedFileSizeTransactedW(
8806 : __in LPCWSTR lpFileName,
8807 : __out_opt LPDWORD lpFileSizeHigh,
8808 : __in HANDLE hTransaction
8809 : );
8810 : #ifdef UNICODE
8811 : #define GetCompressedFileSizeTransacted GetCompressedFileSizeTransactedW
8812 : #else
8813 : #define GetCompressedFileSizeTransacted GetCompressedFileSizeTransactedA
8814 : #endif // !UNICODE
8815 :
8816 : #endif // _WIN32_WINNT >= 0x0600
8817 :
8818 : WINBASEAPI
8819 : BOOL
8820 : WINAPI
8821 : DeleteFileA(
8822 : __in LPCSTR lpFileName
8823 : );
8824 : WINBASEAPI
8825 : BOOL
8826 : WINAPI
8827 : DeleteFileW(
8828 : __in LPCWSTR lpFileName
8829 : );
8830 : #ifdef UNICODE
8831 : #define DeleteFile DeleteFileW
8832 : #else
8833 : #define DeleteFile DeleteFileA
8834 : #endif // !UNICODE
8835 :
8836 : #if _WIN32_WINNT >= 0x0600
8837 :
8838 : WINBASEAPI
8839 : BOOL
8840 : WINAPI
8841 : DeleteFileTransactedA(
8842 : __in LPCSTR lpFileName,
8843 : __in HANDLE hTransaction
8844 : );
8845 : WINBASEAPI
8846 : BOOL
8847 : WINAPI
8848 : DeleteFileTransactedW(
8849 : __in LPCWSTR lpFileName,
8850 : __in HANDLE hTransaction
8851 : );
8852 : #ifdef UNICODE
8853 : #define DeleteFileTransacted DeleteFileTransactedW
8854 : #else
8855 : #define DeleteFileTransacted DeleteFileTransactedA
8856 : #endif // !UNICODE
8857 :
8858 : #endif // _WIN32_WINNT >= 0x0600
8859 :
8860 : #if defined(_M_CEE)
8861 : #undef DeleteFile
8862 : __inline
8863 : BOOL
8864 : DeleteFile(
8865 : LPCTSTR lpFileName
8866 : )
8867 : {
8868 : #ifdef UNICODE
8869 : return DeleteFileW(
8870 : #else
8871 : return DeleteFileA(
8872 : #endif
8873 : lpFileName
8874 : );
8875 : }
8876 : #endif /* _M_CEE */
8877 :
8878 :
8879 : #if _WIN32_WINNT >= 0x0501
8880 :
8881 : WINBASEAPI
8882 : BOOL
8883 : WINAPI
8884 : CheckNameLegalDOS8Dot3A(
8885 : __in LPCSTR lpName,
8886 : __out_ecount_opt(OemNameSize) LPSTR lpOemName,
8887 : __in DWORD OemNameSize,
8888 : __out_opt PBOOL pbNameContainsSpaces OPTIONAL,
8889 : __out PBOOL pbNameLegal
8890 : );
8891 : WINBASEAPI
8892 : BOOL
8893 : WINAPI
8894 : CheckNameLegalDOS8Dot3W(
8895 : __in LPCWSTR lpName,
8896 : __out_ecount_opt(OemNameSize) LPSTR lpOemName,
8897 : __in DWORD OemNameSize,
8898 : __out_opt PBOOL pbNameContainsSpaces OPTIONAL,
8899 : __out PBOOL pbNameLegal
8900 : );
8901 : #ifdef UNICODE
8902 : #define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W
8903 : #else
8904 : #define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A
8905 : #endif // !UNICODE
8906 :
8907 : #endif // (_WIN32_WINNT >= 0x0501)
8908 :
8909 : #if(_WIN32_WINNT >= 0x0400)
8910 : typedef enum _FINDEX_INFO_LEVELS {
8911 : FindExInfoStandard,
8912 : FindExInfoMaxInfoLevel
8913 : } FINDEX_INFO_LEVELS;
8914 :
8915 : typedef enum _FINDEX_SEARCH_OPS {
8916 : FindExSearchNameMatch,
8917 : FindExSearchLimitToDirectories,
8918 : FindExSearchLimitToDevices,
8919 : FindExSearchMaxSearchOp
8920 : } FINDEX_SEARCH_OPS;
8921 :
8922 : #define FIND_FIRST_EX_CASE_SENSITIVE 0x00000001
8923 :
8924 : WINBASEAPI
8925 : __out
8926 : HANDLE
8927 : WINAPI
8928 : FindFirstFileExA(
8929 : __in LPCSTR lpFileName,
8930 : __in FINDEX_INFO_LEVELS fInfoLevelId,
8931 : __out LPVOID lpFindFileData,
8932 : __in FINDEX_SEARCH_OPS fSearchOp,
8933 : __reserved LPVOID lpSearchFilter,
8934 : __in DWORD dwAdditionalFlags
8935 : );
8936 : WINBASEAPI
8937 : __out
8938 : HANDLE
8939 : WINAPI
8940 : FindFirstFileExW(
8941 : __in LPCWSTR lpFileName,
8942 : __in FINDEX_INFO_LEVELS fInfoLevelId,
8943 : __out LPVOID lpFindFileData,
8944 : __in FINDEX_SEARCH_OPS fSearchOp,
8945 : __reserved LPVOID lpSearchFilter,
8946 : __in DWORD dwAdditionalFlags
8947 : );
8948 : #ifdef UNICODE
8949 : #define FindFirstFileEx FindFirstFileExW
8950 : #else
8951 : #define FindFirstFileEx FindFirstFileExA
8952 : #endif // !UNICODE
8953 :
8954 : #if _WIN32_WINNT >= 0x0600
8955 :
8956 : WINBASEAPI
8957 : __out
8958 : HANDLE
8959 : WINAPI
8960 : FindFirstFileTransactedA(
8961 : __in LPCSTR lpFileName,
8962 : __in FINDEX_INFO_LEVELS fInfoLevelId,
8963 : __out LPVOID lpFindFileData,
8964 : __in FINDEX_SEARCH_OPS fSearchOp,
8965 : __reserved LPVOID lpSearchFilter,
8966 : __in DWORD dwAdditionalFlags,
8967 : __in HANDLE hTransaction
8968 : );
8969 : WINBASEAPI
8970 : __out
8971 : HANDLE
8972 : WINAPI
8973 : FindFirstFileTransactedW(
8974 : __in LPCWSTR lpFileName,
8975 : __in FINDEX_INFO_LEVELS fInfoLevelId,
8976 : __out LPVOID lpFindFileData,
8977 : __in FINDEX_SEARCH_OPS fSearchOp,
8978 : __reserved LPVOID lpSearchFilter,
8979 : __in DWORD dwAdditionalFlags,
8980 : __in HANDLE hTransaction
8981 : );
8982 : #ifdef UNICODE
8983 : #define FindFirstFileTransacted FindFirstFileTransactedW
8984 : #else
8985 : #define FindFirstFileTransacted FindFirstFileTransactedA
8986 : #endif // !UNICODE
8987 :
8988 : #endif
8989 :
8990 : #endif /* _WIN32_WINNT >= 0x0400 */
8991 :
8992 : WINBASEAPI
8993 : __out
8994 : HANDLE
8995 : WINAPI
8996 : FindFirstFileA(
8997 : __in LPCSTR lpFileName,
8998 : __out LPWIN32_FIND_DATAA lpFindFileData
8999 : );
9000 : WINBASEAPI
9001 : __out
9002 : HANDLE
9003 : WINAPI
9004 : FindFirstFileW(
9005 : __in LPCWSTR lpFileName,
9006 : __out LPWIN32_FIND_DATAW lpFindFileData
9007 : );
9008 : #ifdef UNICODE
9009 : #define FindFirstFile FindFirstFileW
9010 : #else
9011 : #define FindFirstFile FindFirstFileA
9012 : #endif // !UNICODE
9013 :
9014 : WINBASEAPI
9015 : BOOL
9016 : WINAPI
9017 : FindNextFileA(
9018 : __in HANDLE hFindFile,
9019 : __out LPWIN32_FIND_DATAA lpFindFileData
9020 : );
9021 : WINBASEAPI
9022 : BOOL
9023 : WINAPI
9024 : FindNextFileW(
9025 : __in HANDLE hFindFile,
9026 : __out LPWIN32_FIND_DATAW lpFindFileData
9027 : );
9028 : #ifdef UNICODE
9029 : #define FindNextFile FindNextFileW
9030 : #else
9031 : #define FindNextFile FindNextFileA
9032 : #endif // !UNICODE
9033 :
9034 :
9035 : WINBASEAPI
9036 : DWORD
9037 : WINAPI
9038 : SearchPathA(
9039 : __in_opt LPCSTR lpPath,
9040 : __in LPCSTR lpFileName,
9041 : __in_opt LPCSTR lpExtension,
9042 : __in DWORD nBufferLength,
9043 : __out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer,
9044 : __out_opt LPSTR *lpFilePart
9045 : );
9046 : WINBASEAPI
9047 : DWORD
9048 : WINAPI
9049 : SearchPathW(
9050 : __in_opt LPCWSTR lpPath,
9051 : __in LPCWSTR lpFileName,
9052 : __in_opt LPCWSTR lpExtension,
9053 : __in DWORD nBufferLength,
9054 : __out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer,
9055 : __out_opt LPWSTR *lpFilePart
9056 : );
9057 : #ifdef UNICODE
9058 : #define SearchPath SearchPathW
9059 : #else
9060 : #define SearchPath SearchPathA
9061 : #endif // !UNICODE
9062 :
9063 : WINBASEAPI
9064 : BOOL
9065 : WINAPI
9066 : CopyFileA(
9067 : __in LPCSTR lpExistingFileName,
9068 : __in LPCSTR lpNewFileName,
9069 : __in BOOL bFailIfExists
9070 : );
9071 : WINBASEAPI
9072 : BOOL
9073 : WINAPI
9074 : CopyFileW(
9075 : __in LPCWSTR lpExistingFileName,
9076 : __in LPCWSTR lpNewFileName,
9077 : __in BOOL bFailIfExists
9078 : );
9079 : #ifdef UNICODE
9080 : #define CopyFile CopyFileW
9081 : #else
9082 : #define CopyFile CopyFileA
9083 : #endif // !UNICODE
9084 :
9085 : #if defined(_M_CEE)
9086 : #undef CopyFile
9087 : __inline
9088 : BOOL
9089 : CopyFile(
9090 : LPCTSTR lpExistingFileName,
9091 : LPCTSTR lpNewFileName,
9092 : BOOL bFailIfExists
9093 : )
9094 : {
9095 : #ifdef UNICODE
9096 : return CopyFileW(
9097 : #else
9098 : return CopyFileA(
9099 : #endif
9100 : lpExistingFileName,
9101 : lpNewFileName,
9102 : bFailIfExists
9103 : );
9104 : }
9105 : #endif /* _M_CEE */
9106 :
9107 : #if(_WIN32_WINNT >= 0x0400)
9108 : typedef
9109 : DWORD
9110 : (WINAPI *LPPROGRESS_ROUTINE)(
9111 : __in LARGE_INTEGER TotalFileSize,
9112 : __in LARGE_INTEGER TotalBytesTransferred,
9113 : __in LARGE_INTEGER StreamSize,
9114 : __in LARGE_INTEGER StreamBytesTransferred,
9115 : __in DWORD dwStreamNumber,
9116 : __in DWORD dwCallbackReason,
9117 : __in HANDLE hSourceFile,
9118 : __in HANDLE hDestinationFile,
9119 : __in_opt LPVOID lpData
9120 : );
9121 :
9122 : WINBASEAPI
9123 : BOOL
9124 : WINAPI
9125 : CopyFileExA(
9126 : __in LPCSTR lpExistingFileName,
9127 : __in LPCSTR lpNewFileName,
9128 : __in_opt LPPROGRESS_ROUTINE lpProgressRoutine,
9129 : __in_opt LPVOID lpData,
9130 : __in_opt LPBOOL pbCancel,
9131 : __in DWORD dwCopyFlags
9132 : );
9133 : WINBASEAPI
9134 : BOOL
9135 : WINAPI
9136 : CopyFileExW(
9137 : __in LPCWSTR lpExistingFileName,
9138 : __in LPCWSTR lpNewFileName,
9139 : __in_opt LPPROGRESS_ROUTINE lpProgressRoutine,
9140 : __in_opt LPVOID lpData,
9141 : __in_opt LPBOOL pbCancel,
9142 : __in DWORD dwCopyFlags
9143 : );
9144 : #ifdef UNICODE
9145 : #define CopyFileEx CopyFileExW
9146 : #else
9147 : #define CopyFileEx CopyFileExA
9148 : #endif // !UNICODE
9149 :
9150 : #if _WIN32_WINNT >= 0x0600
9151 :
9152 : WINBASEAPI
9153 : BOOL
9154 : WINAPI
9155 : CopyFileTransactedA(
9156 : __in LPCSTR lpExistingFileName,
9157 : __in LPCSTR lpNewFileName,
9158 : __in_opt LPPROGRESS_ROUTINE lpProgressRoutine,
9159 : __in_opt LPVOID lpData,
9160 : __in_opt LPBOOL pbCancel,
9161 : __in DWORD dwCopyFlags,
9162 : __in HANDLE hTransaction
9163 : );
9164 : WINBASEAPI
9165 : BOOL
9166 : WINAPI
9167 : CopyFileTransactedW(
9168 : __in LPCWSTR lpExistingFileName,
9169 : __in LPCWSTR lpNewFileName,
9170 : __in_opt LPPROGRESS_ROUTINE lpProgressRoutine,
9171 : __in_opt LPVOID lpData,
9172 : __in_opt LPBOOL pbCancel,
9173 : __in DWORD dwCopyFlags,
9174 : __in HANDLE hTransaction
9175 : );
9176 : #ifdef UNICODE
9177 : #define CopyFileTransacted CopyFileTransactedW
9178 : #else
9179 : #define CopyFileTransacted CopyFileTransactedA
9180 : #endif // !UNICODE
9181 :
9182 : #endif // _WIN32_WINNT >= 0x0600
9183 : #endif /* _WIN32_WINNT >= 0x0400 */
9184 :
9185 : WINBASEAPI
9186 : BOOL
9187 : WINAPI
9188 : MoveFileA(
9189 : __in LPCSTR lpExistingFileName,
9190 : __in LPCSTR lpNewFileName
9191 : );
9192 : WINBASEAPI
9193 : BOOL
9194 : WINAPI
9195 : MoveFileW(
9196 : __in LPCWSTR lpExistingFileName,
9197 : __in LPCWSTR lpNewFileName
9198 : );
9199 : #ifdef UNICODE
9200 : #define MoveFile MoveFileW
9201 : #else
9202 : #define MoveFile MoveFileA
9203 : #endif // !UNICODE
9204 :
9205 : #if defined(_M_CEE)
9206 : #undef MoveFile
9207 : __inline
9208 : BOOL
9209 : MoveFile(
9210 : LPCTSTR lpExistingFileName,
9211 : LPCTSTR lpNewFileName
9212 : )
9213 : {
9214 : #ifdef UNICODE
9215 : return MoveFileW(
9216 : #else
9217 : return MoveFileA(
9218 : #endif
9219 : lpExistingFileName,
9220 : lpNewFileName
9221 : );
9222 : }
9223 : #endif /* _M_CEE */
9224 :
9225 : WINBASEAPI
9226 : BOOL
9227 : WINAPI
9228 : MoveFileExA(
9229 : __in LPCSTR lpExistingFileName,
9230 : __in_opt LPCSTR lpNewFileName,
9231 : __in DWORD dwFlags
9232 : );
9233 : WINBASEAPI
9234 : BOOL
9235 : WINAPI
9236 : MoveFileExW(
9237 : __in LPCWSTR lpExistingFileName,
9238 : __in_opt LPCWSTR lpNewFileName,
9239 : __in DWORD dwFlags
9240 : );
9241 : #ifdef UNICODE
9242 : #define MoveFileEx MoveFileExW
9243 : #else
9244 : #define MoveFileEx MoveFileExA
9245 : #endif // !UNICODE
9246 :
9247 : #if (_WIN32_WINNT >= 0x0500)
9248 : WINBASEAPI
9249 : BOOL
9250 : WINAPI
9251 : MoveFileWithProgressA(
9252 : __in LPCSTR lpExistingFileName,
9253 : __in_opt LPCSTR lpNewFileName,
9254 : __in_opt LPPROGRESS_ROUTINE lpProgressRoutine,
9255 : __in_opt LPVOID lpData,
9256 : __in DWORD dwFlags
9257 : );
9258 : WINBASEAPI
9259 : BOOL
9260 : WINAPI
9261 : MoveFileWithProgressW(
9262 : __in LPCWSTR lpExistingFileName,
9263 : __in_opt LPCWSTR lpNewFileName,
9264 : __in_opt LPPROGRESS_ROUTINE lpProgressRoutine,
9265 : __in_opt LPVOID lpData,
9266 : __in DWORD dwFlags
9267 : );
9268 : #ifdef UNICODE
9269 : #define MoveFileWithProgress MoveFileWithProgressW
9270 : #else
9271 : #define MoveFileWithProgress MoveFileWithProgressA
9272 : #endif // !UNICODE
9273 : #endif // (_WIN32_WINNT >= 0x0500)
9274 :
9275 : #if (_WIN32_WINNT >= 0x0600)
9276 : WINBASEAPI
9277 : BOOL
9278 : WINAPI
9279 : MoveFileTransactedA(
9280 : __in LPCSTR lpExistingFileName,
9281 : __in_opt LPCSTR lpNewFileName,
9282 : __in_opt LPPROGRESS_ROUTINE lpProgressRoutine,
9283 : __in_opt LPVOID lpData,
9284 : __in DWORD dwFlags,
9285 : __in HANDLE hTransaction
9286 : );
9287 : WINBASEAPI
9288 : BOOL
9289 : WINAPI
9290 : MoveFileTransactedW(
9291 : __in LPCWSTR lpExistingFileName,
9292 : __in_opt LPCWSTR lpNewFileName,
9293 : __in_opt LPPROGRESS_ROUTINE lpProgressRoutine,
9294 : __in_opt LPVOID lpData,
9295 : __in DWORD dwFlags,
9296 : __in HANDLE hTransaction
9297 : );
9298 : #ifdef UNICODE
9299 : #define MoveFileTransacted MoveFileTransactedW
9300 : #else
9301 : #define MoveFileTransacted MoveFileTransactedA
9302 : #endif // !UNICODE
9303 : #endif // (_WIN32_WINNT >= 0x0600)
9304 :
9305 : #define MOVEFILE_REPLACE_EXISTING 0x00000001
9306 : #define MOVEFILE_COPY_ALLOWED 0x00000002
9307 : #define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
9308 : #define MOVEFILE_WRITE_THROUGH 0x00000008
9309 : #if (_WIN32_WINNT >= 0x0500)
9310 : #define MOVEFILE_CREATE_HARDLINK 0x00000010
9311 : #define MOVEFILE_FAIL_IF_NOT_TRACKABLE 0x00000020
9312 : #endif // (_WIN32_WINNT >= 0x0500)
9313 :
9314 :
9315 :
9316 : #if (_WIN32_WINNT >= 0x0500)
9317 : WINBASEAPI
9318 : BOOL
9319 : WINAPI
9320 : ReplaceFileA(
9321 : __in LPCSTR lpReplacedFileName,
9322 : __in LPCSTR lpReplacementFileName,
9323 : __in_opt LPCSTR lpBackupFileName,
9324 : __in DWORD dwReplaceFlags,
9325 : __reserved LPVOID lpExclude,
9326 : __reserved LPVOID lpReserved
9327 : );
9328 : WINBASEAPI
9329 : BOOL
9330 : WINAPI
9331 : ReplaceFileW(
9332 : __in LPCWSTR lpReplacedFileName,
9333 : __in LPCWSTR lpReplacementFileName,
9334 : __in_opt LPCWSTR lpBackupFileName,
9335 : __in DWORD dwReplaceFlags,
9336 : __reserved LPVOID lpExclude,
9337 : __reserved LPVOID lpReserved
9338 : );
9339 : #ifdef UNICODE
9340 : #define ReplaceFile ReplaceFileW
9341 : #else
9342 : #define ReplaceFile ReplaceFileA
9343 : #endif // !UNICODE
9344 : #endif // (_WIN32_WINNT >= 0x0500)
9345 :
9346 :
9347 : #if (_WIN32_WINNT >= 0x0500)
9348 : //
9349 : // API call to create hard links.
9350 : //
9351 :
9352 : WINBASEAPI
9353 : BOOL
9354 : WINAPI
9355 : CreateHardLinkA(
9356 : __in LPCSTR lpFileName,
9357 : __in LPCSTR lpExistingFileName,
9358 : __reserved LPSECURITY_ATTRIBUTES lpSecurityAttributes
9359 : );
9360 : WINBASEAPI
9361 : BOOL
9362 : WINAPI
9363 : CreateHardLinkW(
9364 : __in LPCWSTR lpFileName,
9365 : __in LPCWSTR lpExistingFileName,
9366 : __reserved LPSECURITY_ATTRIBUTES lpSecurityAttributes
9367 : );
9368 : #ifdef UNICODE
9369 : #define CreateHardLink CreateHardLinkW
9370 : #else
9371 : #define CreateHardLink CreateHardLinkA
9372 : #endif // !UNICODE
9373 :
9374 : #endif // (_WIN32_WINNT >= 0x0500)
9375 :
9376 : #if (_WIN32_WINNT >= 0x0600)
9377 : //
9378 : // API call to create hard links.
9379 : //
9380 :
9381 : WINBASEAPI
9382 : BOOL
9383 : WINAPI
9384 : CreateHardLinkTransactedA(
9385 : __in LPCSTR lpFileName,
9386 : __in LPCSTR lpExistingFileName,
9387 : __reserved LPSECURITY_ATTRIBUTES lpSecurityAttributes,
9388 : __in HANDLE hTransaction
9389 : );
9390 : WINBASEAPI
9391 : BOOL
9392 : WINAPI
9393 : CreateHardLinkTransactedW(
9394 : __in LPCWSTR lpFileName,
9395 : __in LPCWSTR lpExistingFileName,
9396 : __reserved LPSECURITY_ATTRIBUTES lpSecurityAttributes,
9397 : __in HANDLE hTransaction
9398 : );
9399 : #ifdef UNICODE
9400 : #define CreateHardLinkTransacted CreateHardLinkTransactedW
9401 : #else
9402 : #define CreateHardLinkTransacted CreateHardLinkTransactedA
9403 : #endif // !UNICODE
9404 :
9405 : #endif // (_WIN32_WINNT >= 0x0600)
9406 :
9407 :
9408 : #if (_WIN32_WINNT >= 0x0501)
9409 :
9410 : //
9411 : // API call to enumerate for streams within a file
9412 : //
9413 :
9414 : typedef enum _STREAM_INFO_LEVELS {
9415 :
9416 : FindStreamInfoStandard,
9417 : FindStreamInfoMaxInfoLevel
9418 :
9419 : } STREAM_INFO_LEVELS;
9420 :
9421 : typedef struct _WIN32_FIND_STREAM_DATA {
9422 :
9423 : LARGE_INTEGER StreamSize;
9424 : WCHAR cStreamName[ MAX_PATH + 36 ];
9425 :
9426 : } WIN32_FIND_STREAM_DATA, *PWIN32_FIND_STREAM_DATA;
9427 :
9428 : __out
9429 : HANDLE
9430 : WINAPI
9431 : FindFirstStreamW(
9432 : __in LPCWSTR lpFileName,
9433 : __in STREAM_INFO_LEVELS InfoLevel,
9434 : __out LPVOID lpFindStreamData,
9435 : __reserved DWORD dwFlags
9436 : );
9437 :
9438 : BOOL
9439 : APIENTRY
9440 : FindNextStreamW(
9441 : __in HANDLE hFindStream,
9442 : __out LPVOID lpFindStreamData
9443 : );
9444 : #endif // (_WIN32_WINNT >= 0x0501)
9445 :
9446 : #if _WIN32_WINNT >= 0x0600
9447 :
9448 : HANDLE
9449 : WINAPI
9450 : FindFirstFileNameW (
9451 : __in LPCWSTR lpFileName,
9452 : __in DWORD dwFlags,
9453 : __inout LPDWORD StringLength,
9454 : __inout_ecount(*StringLength) PWCHAR LinkName
9455 : );
9456 :
9457 : BOOL
9458 : APIENTRY
9459 : FindNextFileNameW (
9460 : __in HANDLE hFindStream,
9461 : __inout LPDWORD StringLength,
9462 : __inout_ecount(*StringLength) PWCHAR LinkName
9463 : );
9464 :
9465 : HANDLE
9466 : WINAPI
9467 : FindFirstFileNameTransactedW (
9468 : __in LPCWSTR lpFileName,
9469 : __in DWORD dwFlags,
9470 : __inout LPDWORD StringLength,
9471 : __inout_ecount(*StringLength) PWCHAR LinkName,
9472 : __in_opt HANDLE hTransaction
9473 : );
9474 :
9475 : #endif
9476 :
9477 :
9478 : WINBASEAPI
9479 : __out
9480 : HANDLE
9481 : WINAPI
9482 : CreateNamedPipeA(
9483 : __in LPCSTR lpName,
9484 : __in DWORD dwOpenMode,
9485 : __in DWORD dwPipeMode,
9486 : __in DWORD nMaxInstances,
9487 : __in DWORD nOutBufferSize,
9488 : __in DWORD nInBufferSize,
9489 : __in DWORD nDefaultTimeOut,
9490 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
9491 : );
9492 : WINBASEAPI
9493 : __out
9494 : HANDLE
9495 : WINAPI
9496 : CreateNamedPipeW(
9497 : __in LPCWSTR lpName,
9498 : __in DWORD dwOpenMode,
9499 : __in DWORD dwPipeMode,
9500 : __in DWORD nMaxInstances,
9501 : __in DWORD nOutBufferSize,
9502 : __in DWORD nInBufferSize,
9503 : __in DWORD nDefaultTimeOut,
9504 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
9505 : );
9506 : #ifdef UNICODE
9507 : #define CreateNamedPipe CreateNamedPipeW
9508 : #else
9509 : #define CreateNamedPipe CreateNamedPipeA
9510 : #endif // !UNICODE
9511 :
9512 : WINBASEAPI
9513 : BOOL
9514 : WINAPI
9515 : GetNamedPipeHandleStateA(
9516 : __in HANDLE hNamedPipe,
9517 : __out_opt LPDWORD lpState,
9518 : __out_opt LPDWORD lpCurInstances,
9519 : __out_opt LPDWORD lpMaxCollectionCount,
9520 : __out_opt LPDWORD lpCollectDataTimeout,
9521 : __out_ecount_opt(nMaxUserNameSize) LPSTR lpUserName,
9522 : __in DWORD nMaxUserNameSize
9523 : );
9524 : WINBASEAPI
9525 : BOOL
9526 : WINAPI
9527 : GetNamedPipeHandleStateW(
9528 : __in HANDLE hNamedPipe,
9529 : __out_opt LPDWORD lpState,
9530 : __out_opt LPDWORD lpCurInstances,
9531 : __out_opt LPDWORD lpMaxCollectionCount,
9532 : __out_opt LPDWORD lpCollectDataTimeout,
9533 : __out_ecount_opt(nMaxUserNameSize) LPWSTR lpUserName,
9534 : __in DWORD nMaxUserNameSize
9535 : );
9536 : #ifdef UNICODE
9537 : #define GetNamedPipeHandleState GetNamedPipeHandleStateW
9538 : #else
9539 : #define GetNamedPipeHandleState GetNamedPipeHandleStateA
9540 : #endif // !UNICODE
9541 :
9542 : WINBASEAPI
9543 : BOOL
9544 : WINAPI
9545 : CallNamedPipeA(
9546 : __in LPCSTR lpNamedPipeName,
9547 : __in_bcount_opt(nInBufferSize) LPVOID lpInBuffer,
9548 : __in DWORD nInBufferSize,
9549 : __out_bcount_part_opt(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
9550 : __in DWORD nOutBufferSize,
9551 : __out LPDWORD lpBytesRead,
9552 : __in DWORD nTimeOut
9553 : );
9554 : WINBASEAPI
9555 : BOOL
9556 : WINAPI
9557 : CallNamedPipeW(
9558 : __in LPCWSTR lpNamedPipeName,
9559 : __in_bcount_opt(nInBufferSize) LPVOID lpInBuffer,
9560 : __in DWORD nInBufferSize,
9561 : __out_bcount_part_opt(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
9562 : __in DWORD nOutBufferSize,
9563 : __out LPDWORD lpBytesRead,
9564 : __in DWORD nTimeOut
9565 : );
9566 : #ifdef UNICODE
9567 : #define CallNamedPipe CallNamedPipeW
9568 : #else
9569 : #define CallNamedPipe CallNamedPipeA
9570 : #endif // !UNICODE
9571 :
9572 : WINBASEAPI
9573 : BOOL
9574 : WINAPI
9575 : WaitNamedPipeA(
9576 : __in LPCSTR lpNamedPipeName,
9577 : __in DWORD nTimeOut
9578 : );
9579 : WINBASEAPI
9580 : BOOL
9581 : WINAPI
9582 : WaitNamedPipeW(
9583 : __in LPCWSTR lpNamedPipeName,
9584 : __in DWORD nTimeOut
9585 : );
9586 : #ifdef UNICODE
9587 : #define WaitNamedPipe WaitNamedPipeW
9588 : #else
9589 : #define WaitNamedPipe WaitNamedPipeA
9590 : #endif // !UNICODE
9591 :
9592 : typedef enum {
9593 : PipeAttribute,
9594 : PipeConnectionAttribute,
9595 : PipeHandleAttribute
9596 : } PIPE_ATTRIBUTE_TYPE;
9597 :
9598 : WINBASEAPI
9599 : BOOL
9600 : WINAPI
9601 : GetNamedPipeAttribute(
9602 : __in HANDLE Pipe,
9603 : __in PIPE_ATTRIBUTE_TYPE AttributeType,
9604 : __in PSTR AttributeName,
9605 : __out_bcount(*AttributeValueLength) PVOID AttributeValue,
9606 : __inout PSIZE_T AttributeValueLength
9607 : );
9608 :
9609 : WINBASEAPI
9610 : BOOL
9611 : WINAPI
9612 : SetNamedPipeAttribute(
9613 : __in HANDLE Pipe,
9614 : __in PIPE_ATTRIBUTE_TYPE AttributeType,
9615 : __in PSTR AttributeName,
9616 : __in PVOID AttributeValue,
9617 : __in SIZE_T AttributeValueLength
9618 : );
9619 :
9620 : WINBASEAPI
9621 : BOOL
9622 : WINAPI
9623 : GetNamedPipeClientComputerNameA(
9624 : __in HANDLE Pipe,
9625 : __out_bcount(ClientComputerNameLength) LPSTR ClientComputerName,
9626 : __in ULONG ClientComputerNameLength
9627 : );
9628 : WINBASEAPI
9629 : BOOL
9630 : WINAPI
9631 : GetNamedPipeClientComputerNameW(
9632 : __in HANDLE Pipe,
9633 : __out_bcount(ClientComputerNameLength) LPWSTR ClientComputerName,
9634 : __in ULONG ClientComputerNameLength
9635 : );
9636 : #ifdef UNICODE
9637 : #define GetNamedPipeClientComputerName GetNamedPipeClientComputerNameW
9638 : #else
9639 : #define GetNamedPipeClientComputerName GetNamedPipeClientComputerNameA
9640 : #endif // !UNICODE
9641 :
9642 : WINBASEAPI
9643 : BOOL
9644 : WINAPI
9645 : GetNamedPipeClientProcessId(
9646 : __in HANDLE Pipe,
9647 : __out PULONG ClientProcessId
9648 : );
9649 :
9650 : WINBASEAPI
9651 : BOOL
9652 : WINAPI
9653 : GetNamedPipeClientSessionId(
9654 : __in HANDLE Pipe,
9655 : __out PULONG ClientSessionId
9656 : );
9657 :
9658 : WINBASEAPI
9659 : BOOL
9660 : WINAPI
9661 : GetNamedPipeServerProcessId(
9662 : __in HANDLE Pipe,
9663 : __out PULONG ServerProcessId
9664 : );
9665 :
9666 : WINBASEAPI
9667 : BOOL
9668 : WINAPI
9669 : GetNamedPipeServerSessionId(
9670 : __in HANDLE Pipe,
9671 : __out PULONG ServerSessionId
9672 : );
9673 :
9674 : WINBASEAPI
9675 : BOOL
9676 : WINAPI
9677 : SetVolumeLabelA(
9678 : __in_opt LPCSTR lpRootPathName,
9679 : __in_opt LPCSTR lpVolumeName
9680 : );
9681 : WINBASEAPI
9682 : BOOL
9683 : WINAPI
9684 : SetVolumeLabelW(
9685 : __in_opt LPCWSTR lpRootPathName,
9686 : __in_opt LPCWSTR lpVolumeName
9687 : );
9688 : #ifdef UNICODE
9689 : #define SetVolumeLabel SetVolumeLabelW
9690 : #else
9691 : #define SetVolumeLabel SetVolumeLabelA
9692 : #endif // !UNICODE
9693 :
9694 : WINBASEAPI
9695 : VOID
9696 : WINAPI
9697 : SetFileApisToOEM( VOID );
9698 :
9699 : WINBASEAPI
9700 : VOID
9701 : WINAPI
9702 : SetFileApisToANSI( VOID );
9703 :
9704 : WINBASEAPI
9705 : BOOL
9706 : WINAPI
9707 : AreFileApisANSI( VOID );
9708 :
9709 : WINBASEAPI
9710 : BOOL
9711 : WINAPI
9712 : GetVolumeInformationA(
9713 : __in_opt LPCSTR lpRootPathName,
9714 : __out_ecount_opt(nVolumeNameSize) LPSTR lpVolumeNameBuffer,
9715 : __in DWORD nVolumeNameSize,
9716 : __out_opt LPDWORD lpVolumeSerialNumber,
9717 : __out_opt LPDWORD lpMaximumComponentLength,
9718 : __out_opt LPDWORD lpFileSystemFlags,
9719 : __out_ecount_opt(nFileSystemNameSize) LPSTR lpFileSystemNameBuffer,
9720 : __in DWORD nFileSystemNameSize
9721 : );
9722 : WINBASEAPI
9723 : BOOL
9724 : WINAPI
9725 : GetVolumeInformationW(
9726 : __in_opt LPCWSTR lpRootPathName,
9727 : __out_ecount_opt(nVolumeNameSize) LPWSTR lpVolumeNameBuffer,
9728 : __in DWORD nVolumeNameSize,
9729 : __out_opt LPDWORD lpVolumeSerialNumber,
9730 : __out_opt LPDWORD lpMaximumComponentLength,
9731 : __out_opt LPDWORD lpFileSystemFlags,
9732 : __out_ecount_opt(nFileSystemNameSize) LPWSTR lpFileSystemNameBuffer,
9733 : __in DWORD nFileSystemNameSize
9734 : );
9735 : #ifdef UNICODE
9736 : #define GetVolumeInformation GetVolumeInformationW
9737 : #else
9738 : #define GetVolumeInformation GetVolumeInformationA
9739 : #endif // !UNICODE
9740 :
9741 : #if(_WIN32_WINNT >= 0x0600)
9742 : WINBASEAPI
9743 : BOOL
9744 : WINAPI
9745 : GetVolumeInformationByHandleW(
9746 : __in HANDLE hFile,
9747 : __out_ecount_opt(nVolumeNameSize) LPWSTR lpVolumeNameBuffer,
9748 : __in DWORD nVolumeNameSize,
9749 : __out_opt LPDWORD lpVolumeSerialNumber,
9750 : __out_opt LPDWORD lpMaximumComponentLength,
9751 : __out_opt LPDWORD lpFileSystemFlags,
9752 : __out_ecount_opt(nFileSystemNameSize) LPWSTR lpFileSystemNameBuffer,
9753 : __in DWORD nFileSystemNameSize
9754 : );
9755 : #endif /* _WIN32_WINNT >= 0x0600 */
9756 :
9757 : WINBASEAPI
9758 : BOOL
9759 : WINAPI
9760 : CancelSynchronousIo(
9761 : __in HANDLE hThread
9762 : );
9763 :
9764 : WINBASEAPI
9765 : BOOL
9766 : WINAPI
9767 : CancelIoEx(
9768 : __in HANDLE hFile,
9769 : __in_opt LPOVERLAPPED lpOverlapped
9770 : );
9771 :
9772 : WINBASEAPI
9773 : BOOL
9774 : WINAPI
9775 : CancelIo(
9776 : __in HANDLE hFile
9777 : );
9778 :
9779 : WINBASEAPI
9780 : BOOL
9781 : WINAPI
9782 : SetFileBandwidthReservation(
9783 : __in HANDLE hFile,
9784 : __in DWORD nPeriodMilliseconds,
9785 : __in DWORD nBytesPerPeriod,
9786 : __in BOOL bDiscardable,
9787 : __out LPDWORD lpTransferSize,
9788 : __out LPDWORD lpNumOutstandingRequests
9789 : );
9790 :
9791 : WINBASEAPI
9792 : BOOL
9793 : WINAPI
9794 : GetFileBandwidthReservation(
9795 : __in HANDLE hFile,
9796 : __out LPDWORD lpPeriodMilliseconds,
9797 : __out LPDWORD lpBytesPerPeriod,
9798 : __out LPBOOL pDiscardable,
9799 : __out LPDWORD lpTransferSize,
9800 : __out LPDWORD lpNumOutstandingRequests
9801 : );
9802 :
9803 : //
9804 : // Event logging APIs
9805 : //
9806 :
9807 : WINADVAPI
9808 : BOOL
9809 : WINAPI
9810 : ClearEventLogA (
9811 : __in HANDLE hEventLog,
9812 : __in_opt LPCSTR lpBackupFileName
9813 : );
9814 : WINADVAPI
9815 : BOOL
9816 : WINAPI
9817 : ClearEventLogW (
9818 : __in HANDLE hEventLog,
9819 : __in_opt LPCWSTR lpBackupFileName
9820 : );
9821 : #ifdef UNICODE
9822 : #define ClearEventLog ClearEventLogW
9823 : #else
9824 : #define ClearEventLog ClearEventLogA
9825 : #endif // !UNICODE
9826 :
9827 : WINADVAPI
9828 : BOOL
9829 : WINAPI
9830 : BackupEventLogA (
9831 : __in HANDLE hEventLog,
9832 : __in LPCSTR lpBackupFileName
9833 : );
9834 : WINADVAPI
9835 : BOOL
9836 : WINAPI
9837 : BackupEventLogW (
9838 : __in HANDLE hEventLog,
9839 : __in LPCWSTR lpBackupFileName
9840 : );
9841 : #ifdef UNICODE
9842 : #define BackupEventLog BackupEventLogW
9843 : #else
9844 : #define BackupEventLog BackupEventLogA
9845 : #endif // !UNICODE
9846 :
9847 : WINADVAPI
9848 : BOOL
9849 : WINAPI
9850 : CloseEventLog (
9851 : __in HANDLE hEventLog
9852 : );
9853 :
9854 : WINADVAPI
9855 : BOOL
9856 : WINAPI
9857 : DeregisterEventSource (
9858 : __in HANDLE hEventLog
9859 : );
9860 :
9861 : WINADVAPI
9862 : BOOL
9863 : WINAPI
9864 : NotifyChangeEventLog(
9865 : __in HANDLE hEventLog,
9866 : __in HANDLE hEvent
9867 : );
9868 :
9869 : WINADVAPI
9870 : BOOL
9871 : WINAPI
9872 : GetNumberOfEventLogRecords (
9873 : __in HANDLE hEventLog,
9874 : __out PDWORD NumberOfRecords
9875 : );
9876 :
9877 : WINADVAPI
9878 : BOOL
9879 : WINAPI
9880 : GetOldestEventLogRecord (
9881 : __in HANDLE hEventLog,
9882 : __out PDWORD OldestRecord
9883 : );
9884 :
9885 : WINADVAPI
9886 : __out
9887 : HANDLE
9888 : WINAPI
9889 : OpenEventLogA (
9890 : __in_opt LPCSTR lpUNCServerName,
9891 : __in LPCSTR lpSourceName
9892 : );
9893 : WINADVAPI
9894 : __out
9895 : HANDLE
9896 : WINAPI
9897 : OpenEventLogW (
9898 : __in_opt LPCWSTR lpUNCServerName,
9899 : __in LPCWSTR lpSourceName
9900 : );
9901 : #ifdef UNICODE
9902 : #define OpenEventLog OpenEventLogW
9903 : #else
9904 : #define OpenEventLog OpenEventLogA
9905 : #endif // !UNICODE
9906 :
9907 : WINADVAPI
9908 : __out
9909 : HANDLE
9910 : WINAPI
9911 : RegisterEventSourceA (
9912 : __in_opt LPCSTR lpUNCServerName,
9913 : __in LPCSTR lpSourceName
9914 : );
9915 : WINADVAPI
9916 : __out
9917 : HANDLE
9918 : WINAPI
9919 : RegisterEventSourceW (
9920 : __in_opt LPCWSTR lpUNCServerName,
9921 : __in LPCWSTR lpSourceName
9922 : );
9923 : #ifdef UNICODE
9924 : #define RegisterEventSource RegisterEventSourceW
9925 : #else
9926 : #define RegisterEventSource RegisterEventSourceA
9927 : #endif // !UNICODE
9928 :
9929 : WINADVAPI
9930 : __out
9931 : HANDLE
9932 : WINAPI
9933 : OpenBackupEventLogA (
9934 : __in_opt LPCSTR lpUNCServerName,
9935 : __in LPCSTR lpFileName
9936 : );
9937 : WINADVAPI
9938 : __out
9939 : HANDLE
9940 : WINAPI
9941 : OpenBackupEventLogW (
9942 : __in_opt LPCWSTR lpUNCServerName,
9943 : __in LPCWSTR lpFileName
9944 : );
9945 : #ifdef UNICODE
9946 : #define OpenBackupEventLog OpenBackupEventLogW
9947 : #else
9948 : #define OpenBackupEventLog OpenBackupEventLogA
9949 : #endif // !UNICODE
9950 :
9951 : WINADVAPI
9952 : BOOL
9953 : WINAPI
9954 : ReadEventLogA (
9955 : __in HANDLE hEventLog,
9956 : __in DWORD dwReadFlags,
9957 : __in DWORD dwRecordOffset,
9958 : __out_bcount_part(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer,
9959 : __in DWORD nNumberOfBytesToRead,
9960 : __out DWORD *pnBytesRead,
9961 : __out DWORD *pnMinNumberOfBytesNeeded
9962 : );
9963 : WINADVAPI
9964 : BOOL
9965 : WINAPI
9966 : ReadEventLogW (
9967 : __in HANDLE hEventLog,
9968 : __in DWORD dwReadFlags,
9969 : __in DWORD dwRecordOffset,
9970 : __out_bcount_part(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer,
9971 : __in DWORD nNumberOfBytesToRead,
9972 : __out DWORD *pnBytesRead,
9973 : __out DWORD *pnMinNumberOfBytesNeeded
9974 : );
9975 : #ifdef UNICODE
9976 : #define ReadEventLog ReadEventLogW
9977 : #else
9978 : #define ReadEventLog ReadEventLogA
9979 : #endif // !UNICODE
9980 :
9981 : WINADVAPI
9982 : BOOL
9983 : WINAPI
9984 : ReportEventA (
9985 : __in HANDLE hEventLog,
9986 : __in WORD wType,
9987 : __in WORD wCategory,
9988 : __in DWORD dwEventID,
9989 : __in_opt PSID lpUserSid,
9990 : __in WORD wNumStrings,
9991 : __in DWORD dwDataSize,
9992 : __in_ecount_opt(wNumStrings) LPCSTR *lpStrings,
9993 : __in_bcount_opt(dwDataSize) LPVOID lpRawData
9994 : );
9995 : WINADVAPI
9996 : BOOL
9997 : WINAPI
9998 : ReportEventW (
9999 : __in HANDLE hEventLog,
10000 : __in WORD wType,
10001 : __in WORD wCategory,
10002 : __in DWORD dwEventID,
10003 : __in_opt PSID lpUserSid,
10004 : __in WORD wNumStrings,
10005 : __in DWORD dwDataSize,
10006 : __in_ecount_opt(wNumStrings) LPCWSTR *lpStrings,
10007 : __in_bcount_opt(dwDataSize) LPVOID lpRawData
10008 : );
10009 : #ifdef UNICODE
10010 : #define ReportEvent ReportEventW
10011 : #else
10012 : #define ReportEvent ReportEventA
10013 : #endif // !UNICODE
10014 :
10015 :
10016 : #define EVENTLOG_FULL_INFO 0
10017 :
10018 : typedef struct _EVENTLOG_FULL_INFORMATION
10019 : {
10020 : DWORD dwFull;
10021 : }
10022 : EVENTLOG_FULL_INFORMATION, *LPEVENTLOG_FULL_INFORMATION;
10023 :
10024 : WINADVAPI
10025 : BOOL
10026 : WINAPI
10027 : GetEventLogInformation (
10028 : __in HANDLE hEventLog,
10029 : __in DWORD dwInfoLevel,
10030 : __out_bcount_part(cbBufSize, *pcbBytesNeeded) LPVOID lpBuffer,
10031 : __in DWORD cbBufSize,
10032 : __out LPDWORD pcbBytesNeeded
10033 : );
10034 :
10035 : //
10036 : //
10037 : // Security APIs
10038 : //
10039 :
10040 :
10041 : WINADVAPI
10042 : BOOL
10043 : WINAPI
10044 : DuplicateToken(
10045 : __in HANDLE ExistingTokenHandle,
10046 : __in SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
10047 : __deref_out PHANDLE DuplicateTokenHandle
10048 : );
10049 :
10050 : WINADVAPI
10051 : BOOL
10052 : WINAPI
10053 : GetKernelObjectSecurity (
10054 : __in HANDLE Handle,
10055 : __in SECURITY_INFORMATION RequestedInformation,
10056 : __out_bcount_opt(nLength) PSECURITY_DESCRIPTOR pSecurityDescriptor,
10057 : __in DWORD nLength,
10058 : __out LPDWORD lpnLengthNeeded
10059 : );
10060 :
10061 : WINADVAPI
10062 : BOOL
10063 : WINAPI
10064 : ImpersonateNamedPipeClient(
10065 : __in HANDLE hNamedPipe
10066 : );
10067 :
10068 : WINADVAPI
10069 : BOOL
10070 : WINAPI
10071 : ImpersonateSelf(
10072 : __in SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
10073 : );
10074 :
10075 :
10076 : WINADVAPI
10077 : BOOL
10078 : WINAPI
10079 : RevertToSelf (
10080 : VOID
10081 : );
10082 :
10083 : WINADVAPI
10084 : BOOL
10085 : APIENTRY
10086 : SetThreadToken (
10087 : __in_opt PHANDLE Thread,
10088 : __in_opt HANDLE Token
10089 : );
10090 :
10091 : WINADVAPI
10092 : BOOL
10093 : WINAPI
10094 : AccessCheck (
10095 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor,
10096 : __in HANDLE ClientToken,
10097 : __in DWORD DesiredAccess,
10098 : __in PGENERIC_MAPPING GenericMapping,
10099 : __out_bcount_part_opt(*PrivilegeSetLength, *PrivilegeSetLength) PPRIVILEGE_SET PrivilegeSet,
10100 : __inout LPDWORD PrivilegeSetLength,
10101 : __out LPDWORD GrantedAccess,
10102 : __out LPBOOL AccessStatus
10103 : );
10104 :
10105 : #if(_WIN32_WINNT >= 0x0500)
10106 : WINADVAPI
10107 : BOOL
10108 : WINAPI
10109 : AccessCheckByType (
10110 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor,
10111 : __in_opt PSID PrincipalSelfSid,
10112 : __in HANDLE ClientToken,
10113 : __in DWORD DesiredAccess,
10114 : __inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
10115 : __in DWORD ObjectTypeListLength,
10116 : __in PGENERIC_MAPPING GenericMapping,
10117 : __out_bcount_part_opt(*PrivilegeSetLength, *PrivilegeSetLength) PPRIVILEGE_SET PrivilegeSet,
10118 : __inout LPDWORD PrivilegeSetLength,
10119 : __out LPDWORD GrantedAccess,
10120 : __out LPBOOL AccessStatus
10121 : );
10122 :
10123 : WINADVAPI
10124 : BOOL
10125 : WINAPI
10126 : AccessCheckByTypeResultList (
10127 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor,
10128 : __in_opt PSID PrincipalSelfSid,
10129 : __in HANDLE ClientToken,
10130 : __in DWORD DesiredAccess,
10131 : __inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
10132 : __in DWORD ObjectTypeListLength,
10133 : __in PGENERIC_MAPPING GenericMapping,
10134 : __out_bcount_part_opt(*PrivilegeSetLength, *PrivilegeSetLength) PPRIVILEGE_SET PrivilegeSet,
10135 : __inout LPDWORD PrivilegeSetLength,
10136 : __out LPDWORD GrantedAccessList,
10137 : __out LPDWORD AccessStatusList
10138 : );
10139 : #endif /* _WIN32_WINNT >= 0x0500 */
10140 :
10141 :
10142 : WINADVAPI
10143 : BOOL
10144 : WINAPI
10145 : OpenProcessToken (
10146 : __in HANDLE ProcessHandle,
10147 : __in DWORD DesiredAccess,
10148 : __deref_out PHANDLE TokenHandle
10149 : );
10150 :
10151 :
10152 : WINADVAPI
10153 : BOOL
10154 : WINAPI
10155 : OpenThreadToken (
10156 : __in HANDLE ThreadHandle,
10157 : __in DWORD DesiredAccess,
10158 : __in BOOL OpenAsSelf,
10159 : __deref_out PHANDLE TokenHandle
10160 : );
10161 :
10162 :
10163 : WINADVAPI
10164 : BOOL
10165 : WINAPI
10166 : GetTokenInformation (
10167 : __in HANDLE TokenHandle,
10168 : __in TOKEN_INFORMATION_CLASS TokenInformationClass,
10169 : __out_bcount_part_opt(TokenInformationLength, *ReturnLength) LPVOID TokenInformation,
10170 : __in DWORD TokenInformationLength,
10171 : __out PDWORD ReturnLength
10172 : );
10173 :
10174 :
10175 : WINADVAPI
10176 : BOOL
10177 : WINAPI
10178 : SetTokenInformation (
10179 : __in HANDLE TokenHandle,
10180 : __in TOKEN_INFORMATION_CLASS TokenInformationClass,
10181 : __in_bcount(TokenInformationLength) LPVOID TokenInformation,
10182 : __in DWORD TokenInformationLength
10183 : );
10184 :
10185 :
10186 : WINADVAPI
10187 : BOOL
10188 : WINAPI
10189 : AdjustTokenPrivileges (
10190 : __in HANDLE TokenHandle,
10191 : __in BOOL DisableAllPrivileges,
10192 : __in_opt PTOKEN_PRIVILEGES NewState,
10193 : __in DWORD BufferLength,
10194 : __out_bcount_part_opt(BufferLength, *ReturnLength) PTOKEN_PRIVILEGES PreviousState,
10195 : __out_opt PDWORD ReturnLength
10196 : );
10197 :
10198 :
10199 : WINADVAPI
10200 : BOOL
10201 : WINAPI
10202 : AdjustTokenGroups (
10203 : __in HANDLE TokenHandle,
10204 : __in BOOL ResetToDefault,
10205 : __in_opt PTOKEN_GROUPS NewState,
10206 : __in DWORD BufferLength,
10207 : __out_bcount_part_opt(BufferLength, *ReturnLength) PTOKEN_GROUPS PreviousState,
10208 : __out_opt PDWORD ReturnLength
10209 : );
10210 :
10211 :
10212 : WINADVAPI
10213 : BOOL
10214 : WINAPI
10215 : PrivilegeCheck (
10216 : __in HANDLE ClientToken,
10217 : __inout PPRIVILEGE_SET RequiredPrivileges,
10218 : __out LPBOOL pfResult
10219 : );
10220 :
10221 :
10222 : WINADVAPI
10223 : BOOL
10224 : WINAPI
10225 : AccessCheckAndAuditAlarmA (
10226 : __in LPCSTR SubsystemName,
10227 : __in_opt LPVOID HandleId,
10228 : __in LPSTR ObjectTypeName,
10229 : __in_opt LPSTR ObjectName,
10230 : __in PSECURITY_DESCRIPTOR SecurityDescriptor,
10231 : __in DWORD DesiredAccess,
10232 : __in PGENERIC_MAPPING GenericMapping,
10233 : __in BOOL ObjectCreation,
10234 : __out LPDWORD GrantedAccess,
10235 : __out LPBOOL AccessStatus,
10236 : __out LPBOOL pfGenerateOnClose
10237 : );
10238 : WINADVAPI
10239 : BOOL
10240 : WINAPI
10241 : AccessCheckAndAuditAlarmW (
10242 : __in LPCWSTR SubsystemName,
10243 : __in_opt LPVOID HandleId,
10244 : __in LPWSTR ObjectTypeName,
10245 : __in_opt LPWSTR ObjectName,
10246 : __in PSECURITY_DESCRIPTOR SecurityDescriptor,
10247 : __in DWORD DesiredAccess,
10248 : __in PGENERIC_MAPPING GenericMapping,
10249 : __in BOOL ObjectCreation,
10250 : __out LPDWORD GrantedAccess,
10251 : __out LPBOOL AccessStatus,
10252 : __out LPBOOL pfGenerateOnClose
10253 : );
10254 : #ifdef UNICODE
10255 : #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW
10256 : #else
10257 : #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA
10258 : #endif // !UNICODE
10259 :
10260 : #if(_WIN32_WINNT >= 0x0500)
10261 :
10262 : WINADVAPI
10263 : BOOL
10264 : WINAPI
10265 : AccessCheckByTypeAndAuditAlarmA (
10266 : __in LPCSTR SubsystemName,
10267 : __in LPVOID HandleId,
10268 : __in LPCSTR ObjectTypeName,
10269 : __in_opt LPCSTR ObjectName,
10270 : __in PSECURITY_DESCRIPTOR SecurityDescriptor,
10271 : __in_opt PSID PrincipalSelfSid,
10272 : __in DWORD DesiredAccess,
10273 : __in AUDIT_EVENT_TYPE AuditType,
10274 : __in DWORD Flags,
10275 : __inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
10276 : __in DWORD ObjectTypeListLength,
10277 : __in PGENERIC_MAPPING GenericMapping,
10278 : __in BOOL ObjectCreation,
10279 : __out LPDWORD GrantedAccess,
10280 : __out LPBOOL AccessStatus,
10281 : __out LPBOOL pfGenerateOnClose
10282 : );
10283 : WINADVAPI
10284 : BOOL
10285 : WINAPI
10286 : AccessCheckByTypeAndAuditAlarmW (
10287 : __in LPCWSTR SubsystemName,
10288 : __in LPVOID HandleId,
10289 : __in LPCWSTR ObjectTypeName,
10290 : __in_opt LPCWSTR ObjectName,
10291 : __in PSECURITY_DESCRIPTOR SecurityDescriptor,
10292 : __in_opt PSID PrincipalSelfSid,
10293 : __in DWORD DesiredAccess,
10294 : __in AUDIT_EVENT_TYPE AuditType,
10295 : __in DWORD Flags,
10296 : __inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
10297 : __in DWORD ObjectTypeListLength,
10298 : __in PGENERIC_MAPPING GenericMapping,
10299 : __in BOOL ObjectCreation,
10300 : __out LPDWORD GrantedAccess,
10301 : __out LPBOOL AccessStatus,
10302 : __out LPBOOL pfGenerateOnClose
10303 : );
10304 : #ifdef UNICODE
10305 : #define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmW
10306 : #else
10307 : #define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmA
10308 : #endif // !UNICODE
10309 :
10310 : WINADVAPI
10311 : BOOL
10312 : WINAPI
10313 : AccessCheckByTypeResultListAndAuditAlarmA (
10314 : __in LPCSTR SubsystemName,
10315 : __in LPVOID HandleId,
10316 : __in LPCSTR ObjectTypeName,
10317 : __in_opt LPCSTR ObjectName,
10318 : __in PSECURITY_DESCRIPTOR SecurityDescriptor,
10319 : __in_opt PSID PrincipalSelfSid,
10320 : __in DWORD DesiredAccess,
10321 : __in AUDIT_EVENT_TYPE AuditType,
10322 : __in DWORD Flags,
10323 : __inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
10324 : __in DWORD ObjectTypeListLength,
10325 : __in PGENERIC_MAPPING GenericMapping,
10326 : __in BOOL ObjectCreation,
10327 : __out LPDWORD GrantedAccess,
10328 : __out LPDWORD AccessStatusList,
10329 : __out LPBOOL pfGenerateOnClose
10330 : );
10331 : WINADVAPI
10332 : BOOL
10333 : WINAPI
10334 : AccessCheckByTypeResultListAndAuditAlarmW (
10335 : __in LPCWSTR SubsystemName,
10336 : __in LPVOID HandleId,
10337 : __in LPCWSTR ObjectTypeName,
10338 : __in_opt LPCWSTR ObjectName,
10339 : __in PSECURITY_DESCRIPTOR SecurityDescriptor,
10340 : __in_opt PSID PrincipalSelfSid,
10341 : __in DWORD DesiredAccess,
10342 : __in AUDIT_EVENT_TYPE AuditType,
10343 : __in DWORD Flags,
10344 : __inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
10345 : __in DWORD ObjectTypeListLength,
10346 : __in PGENERIC_MAPPING GenericMapping,
10347 : __in BOOL ObjectCreation,
10348 : __out LPDWORD GrantedAccess,
10349 : __out LPDWORD AccessStatusList,
10350 : __out LPBOOL pfGenerateOnClose
10351 : );
10352 : #ifdef UNICODE
10353 : #define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAndAuditAlarmW
10354 : #else
10355 : #define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAndAuditAlarmA
10356 : #endif // !UNICODE
10357 :
10358 : WINADVAPI
10359 : BOOL
10360 : WINAPI
10361 : AccessCheckByTypeResultListAndAuditAlarmByHandleA (
10362 : __in LPCSTR SubsystemName,
10363 : __in LPVOID HandleId,
10364 : __in HANDLE ClientToken,
10365 : __in LPCSTR ObjectTypeName,
10366 : __in_opt LPCSTR ObjectName,
10367 : __in PSECURITY_DESCRIPTOR SecurityDescriptor,
10368 : __in_opt PSID PrincipalSelfSid,
10369 : __in DWORD DesiredAccess,
10370 : __in AUDIT_EVENT_TYPE AuditType,
10371 : __in DWORD Flags,
10372 : __inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
10373 : __in DWORD ObjectTypeListLength,
10374 : __in PGENERIC_MAPPING GenericMapping,
10375 : __in BOOL ObjectCreation,
10376 : __out LPDWORD GrantedAccess,
10377 : __out LPDWORD AccessStatusList,
10378 : __out LPBOOL pfGenerateOnClose
10379 : );
10380 : WINADVAPI
10381 : BOOL
10382 : WINAPI
10383 : AccessCheckByTypeResultListAndAuditAlarmByHandleW (
10384 : __in LPCWSTR SubsystemName,
10385 : __in LPVOID HandleId,
10386 : __in HANDLE ClientToken,
10387 : __in LPCWSTR ObjectTypeName,
10388 : __in_opt LPCWSTR ObjectName,
10389 : __in PSECURITY_DESCRIPTOR SecurityDescriptor,
10390 : __in_opt PSID PrincipalSelfSid,
10391 : __in DWORD DesiredAccess,
10392 : __in AUDIT_EVENT_TYPE AuditType,
10393 : __in DWORD Flags,
10394 : __inout_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
10395 : __in DWORD ObjectTypeListLength,
10396 : __in PGENERIC_MAPPING GenericMapping,
10397 : __in BOOL ObjectCreation,
10398 : __out LPDWORD GrantedAccess,
10399 : __out LPDWORD AccessStatusList,
10400 : __out LPBOOL pfGenerateOnClose
10401 : );
10402 : #ifdef UNICODE
10403 : #define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResultListAndAuditAlarmByHandleW
10404 : #else
10405 : #define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResultListAndAuditAlarmByHandleA
10406 : #endif // !UNICODE
10407 :
10408 : #endif //(_WIN32_WINNT >= 0x0500)
10409 :
10410 : WINADVAPI
10411 : BOOL
10412 : WINAPI
10413 : ObjectOpenAuditAlarmA (
10414 : __in LPCSTR SubsystemName,
10415 : __in LPVOID HandleId,
10416 : __in LPSTR ObjectTypeName,
10417 : __in_opt LPSTR ObjectName,
10418 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor,
10419 : __in HANDLE ClientToken,
10420 : __in DWORD DesiredAccess,
10421 : __in DWORD GrantedAccess,
10422 : __in_opt PPRIVILEGE_SET Privileges,
10423 : __in BOOL ObjectCreation,
10424 : __in BOOL AccessGranted,
10425 : __out LPBOOL GenerateOnClose
10426 : );
10427 : WINADVAPI
10428 : BOOL
10429 : WINAPI
10430 : ObjectOpenAuditAlarmW (
10431 : __in LPCWSTR SubsystemName,
10432 : __in LPVOID HandleId,
10433 : __in LPWSTR ObjectTypeName,
10434 : __in_opt LPWSTR ObjectName,
10435 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor,
10436 : __in HANDLE ClientToken,
10437 : __in DWORD DesiredAccess,
10438 : __in DWORD GrantedAccess,
10439 : __in_opt PPRIVILEGE_SET Privileges,
10440 : __in BOOL ObjectCreation,
10441 : __in BOOL AccessGranted,
10442 : __out LPBOOL GenerateOnClose
10443 : );
10444 : #ifdef UNICODE
10445 : #define ObjectOpenAuditAlarm ObjectOpenAuditAlarmW
10446 : #else
10447 : #define ObjectOpenAuditAlarm ObjectOpenAuditAlarmA
10448 : #endif // !UNICODE
10449 :
10450 :
10451 : WINADVAPI
10452 : BOOL
10453 : WINAPI
10454 : ObjectPrivilegeAuditAlarmA (
10455 : __in LPCSTR SubsystemName,
10456 : __in LPVOID HandleId,
10457 : __in HANDLE ClientToken,
10458 : __in DWORD DesiredAccess,
10459 : __in PPRIVILEGE_SET Privileges,
10460 : __in BOOL AccessGranted
10461 : );
10462 : WINADVAPI
10463 : BOOL
10464 : WINAPI
10465 : ObjectPrivilegeAuditAlarmW (
10466 : __in LPCWSTR SubsystemName,
10467 : __in LPVOID HandleId,
10468 : __in HANDLE ClientToken,
10469 : __in DWORD DesiredAccess,
10470 : __in PPRIVILEGE_SET Privileges,
10471 : __in BOOL AccessGranted
10472 : );
10473 : #ifdef UNICODE
10474 : #define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmW
10475 : #else
10476 : #define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmA
10477 : #endif // !UNICODE
10478 :
10479 :
10480 : WINADVAPI
10481 : BOOL
10482 : WINAPI
10483 : ObjectCloseAuditAlarmA (
10484 : __in LPCSTR SubsystemName,
10485 : __in LPVOID HandleId,
10486 : __in BOOL GenerateOnClose
10487 : );
10488 : WINADVAPI
10489 : BOOL
10490 : WINAPI
10491 : ObjectCloseAuditAlarmW (
10492 : __in LPCWSTR SubsystemName,
10493 : __in LPVOID HandleId,
10494 : __in BOOL GenerateOnClose
10495 : );
10496 : #ifdef UNICODE
10497 : #define ObjectCloseAuditAlarm ObjectCloseAuditAlarmW
10498 : #else
10499 : #define ObjectCloseAuditAlarm ObjectCloseAuditAlarmA
10500 : #endif // !UNICODE
10501 :
10502 :
10503 : WINADVAPI
10504 : BOOL
10505 : WINAPI
10506 : ObjectDeleteAuditAlarmA (
10507 : __in LPCSTR SubsystemName,
10508 : __in LPVOID HandleId,
10509 : __in BOOL GenerateOnClose
10510 : );
10511 : WINADVAPI
10512 : BOOL
10513 : WINAPI
10514 : ObjectDeleteAuditAlarmW (
10515 : __in LPCWSTR SubsystemName,
10516 : __in LPVOID HandleId,
10517 : __in BOOL GenerateOnClose
10518 : );
10519 : #ifdef UNICODE
10520 : #define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmW
10521 : #else
10522 : #define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmA
10523 : #endif // !UNICODE
10524 :
10525 :
10526 : WINADVAPI
10527 : BOOL
10528 : WINAPI
10529 : PrivilegedServiceAuditAlarmA (
10530 : __in LPCSTR SubsystemName,
10531 : __in LPCSTR ServiceName,
10532 : __in HANDLE ClientToken,
10533 : __in PPRIVILEGE_SET Privileges,
10534 : __in BOOL AccessGranted
10535 : );
10536 : WINADVAPI
10537 : BOOL
10538 : WINAPI
10539 : PrivilegedServiceAuditAlarmW (
10540 : __in LPCWSTR SubsystemName,
10541 : __in LPCWSTR ServiceName,
10542 : __in HANDLE ClientToken,
10543 : __in PPRIVILEGE_SET Privileges,
10544 : __in BOOL AccessGranted
10545 : );
10546 : #ifdef UNICODE
10547 : #define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmW
10548 : #else
10549 : #define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmA
10550 : #endif // !UNICODE
10551 :
10552 :
10553 :
10554 : #if(_WIN32_WINNT >= 0x0501)
10555 :
10556 :
10557 : WINADVAPI
10558 : BOOL
10559 : WINAPI
10560 : IsWellKnownSid (
10561 : __in PSID pSid,
10562 : __in WELL_KNOWN_SID_TYPE WellKnownSidType
10563 : );
10564 :
10565 : WINADVAPI
10566 : BOOL
10567 : WINAPI
10568 : CreateWellKnownSid(
10569 : __in WELL_KNOWN_SID_TYPE WellKnownSidType,
10570 : __in_opt PSID DomainSid,
10571 : __out_bcount_part_opt(*cbSid, *cbSid) PSID pSid,
10572 : __inout DWORD *cbSid
10573 : );
10574 :
10575 : WINADVAPI
10576 : BOOL
10577 : WINAPI
10578 : EqualDomainSid(
10579 : __in PSID pSid1,
10580 : __in PSID pSid2,
10581 : __out BOOL *pfEqual
10582 : );
10583 :
10584 : WINADVAPI
10585 : BOOL
10586 : WINAPI
10587 : GetWindowsAccountDomainSid(
10588 : __in PSID pSid,
10589 : __out_bcount_part_opt(*cbDomainSid, *cbDomainSid) PSID pDomainSid,
10590 : __inout DWORD* cbDomainSid
10591 : );
10592 :
10593 : #endif //(_WIN32_WINNT >= 0x0501)
10594 :
10595 : WINADVAPI
10596 : BOOL
10597 : WINAPI
10598 : IsValidSid (
10599 : __in PSID pSid
10600 : );
10601 :
10602 :
10603 : WINADVAPI
10604 : BOOL
10605 : WINAPI
10606 : EqualSid (
10607 : __in PSID pSid1,
10608 : __in PSID pSid2
10609 : );
10610 :
10611 :
10612 : WINADVAPI
10613 : BOOL
10614 : WINAPI
10615 : EqualPrefixSid (
10616 : __in PSID pSid1,
10617 : __in PSID pSid2
10618 : );
10619 :
10620 :
10621 : WINADVAPI
10622 : DWORD
10623 : WINAPI
10624 : GetSidLengthRequired (
10625 : __in UCHAR nSubAuthorityCount
10626 : );
10627 :
10628 :
10629 : WINADVAPI
10630 : BOOL
10631 : WINAPI
10632 : AllocateAndInitializeSid (
10633 : __in PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
10634 : __in BYTE nSubAuthorityCount,
10635 : __in DWORD nSubAuthority0,
10636 : __in DWORD nSubAuthority1,
10637 : __in DWORD nSubAuthority2,
10638 : __in DWORD nSubAuthority3,
10639 : __in DWORD nSubAuthority4,
10640 : __in DWORD nSubAuthority5,
10641 : __in DWORD nSubAuthority6,
10642 : __in DWORD nSubAuthority7,
10643 : __deref_out PSID *pSid
10644 : );
10645 :
10646 : WINADVAPI
10647 : PVOID
10648 : WINAPI
10649 : FreeSid(
10650 : __in PSID pSid
10651 : );
10652 :
10653 : WINADVAPI
10654 : BOOL
10655 : WINAPI
10656 : InitializeSid (
10657 : __out PSID Sid,
10658 : __in PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
10659 : __in BYTE nSubAuthorityCount
10660 : );
10661 :
10662 :
10663 : WINADVAPI
10664 : __out
10665 : PSID_IDENTIFIER_AUTHORITY
10666 : WINAPI
10667 : GetSidIdentifierAuthority (
10668 : __in PSID pSid
10669 : );
10670 :
10671 :
10672 : WINADVAPI
10673 : __out
10674 : PDWORD
10675 : WINAPI
10676 : GetSidSubAuthority (
10677 : __in PSID pSid,
10678 : __in DWORD nSubAuthority
10679 : );
10680 :
10681 :
10682 : WINADVAPI
10683 : __out
10684 : PUCHAR
10685 : WINAPI
10686 : GetSidSubAuthorityCount (
10687 : __in PSID pSid
10688 : );
10689 :
10690 :
10691 : WINADVAPI
10692 : DWORD
10693 : WINAPI
10694 : GetLengthSid (
10695 : __in PSID pSid
10696 : );
10697 :
10698 :
10699 : WINADVAPI
10700 : BOOL
10701 : WINAPI
10702 : CopySid (
10703 : __in DWORD nDestinationSidLength,
10704 : __out_bcount(nDestinationSidLength) PSID pDestinationSid,
10705 : __in PSID pSourceSid
10706 : );
10707 :
10708 :
10709 : WINADVAPI
10710 : BOOL
10711 : WINAPI
10712 : AreAllAccessesGranted (
10713 : __in DWORD GrantedAccess,
10714 : __in DWORD DesiredAccess
10715 : );
10716 :
10717 :
10718 : WINADVAPI
10719 : BOOL
10720 : WINAPI
10721 : AreAnyAccessesGranted (
10722 : __in DWORD GrantedAccess,
10723 : __in DWORD DesiredAccess
10724 : );
10725 :
10726 :
10727 : WINADVAPI
10728 : VOID
10729 : WINAPI
10730 : MapGenericMask (
10731 : __inout PDWORD AccessMask,
10732 : __in PGENERIC_MAPPING GenericMapping
10733 : );
10734 :
10735 :
10736 : WINADVAPI
10737 : BOOL
10738 : WINAPI
10739 : IsValidAcl (
10740 : __in PACL pAcl
10741 : );
10742 :
10743 :
10744 : WINADVAPI
10745 : BOOL
10746 : WINAPI
10747 : InitializeAcl (
10748 : __out_bcount(nAclLength) PACL pAcl,
10749 : __in DWORD nAclLength,
10750 : __in DWORD dwAclRevision
10751 : );
10752 :
10753 :
10754 : WINADVAPI
10755 : BOOL
10756 : WINAPI
10757 : GetAclInformation (
10758 : __in PACL pAcl,
10759 : __out_bcount(nAclInformationLength) LPVOID pAclInformation,
10760 : __in DWORD nAclInformationLength,
10761 : __in ACL_INFORMATION_CLASS dwAclInformationClass
10762 : );
10763 :
10764 :
10765 : WINADVAPI
10766 : BOOL
10767 : WINAPI
10768 : SetAclInformation (
10769 : __inout PACL pAcl,
10770 : __in_bcount(nAclInformationLength) LPVOID pAclInformation,
10771 : __in DWORD nAclInformationLength,
10772 : __in ACL_INFORMATION_CLASS dwAclInformationClass
10773 : );
10774 :
10775 :
10776 : WINADVAPI
10777 : BOOL
10778 : WINAPI
10779 : AddAce (
10780 : __inout PACL pAcl,
10781 : __in DWORD dwAceRevision,
10782 : __in DWORD dwStartingAceIndex,
10783 : __in_bcount(nAceListLength) LPVOID pAceList,
10784 : __in DWORD nAceListLength
10785 : );
10786 :
10787 :
10788 : WINADVAPI
10789 : BOOL
10790 : WINAPI
10791 : DeleteAce (
10792 : __inout PACL pAcl,
10793 : __in DWORD dwAceIndex
10794 : );
10795 :
10796 :
10797 : WINADVAPI
10798 : BOOL
10799 : WINAPI
10800 : GetAce (
10801 : __in PACL pAcl,
10802 : __in DWORD dwAceIndex,
10803 : __deref_out LPVOID *pAce
10804 : );
10805 :
10806 :
10807 : WINADVAPI
10808 : BOOL
10809 : WINAPI
10810 : AddAccessAllowedAce (
10811 : __inout PACL pAcl,
10812 : __in DWORD dwAceRevision,
10813 : __in DWORD AccessMask,
10814 : __in PSID pSid
10815 : );
10816 :
10817 : #if(_WIN32_WINNT >= 0x0500)
10818 : WINADVAPI
10819 : BOOL
10820 : WINAPI
10821 : AddAccessAllowedAceEx (
10822 : __inout PACL pAcl,
10823 : __in DWORD dwAceRevision,
10824 : __in DWORD AceFlags,
10825 : __in DWORD AccessMask,
10826 : __in PSID pSid
10827 : );
10828 : #endif /* _WIN32_WINNT >= 0x0500 */
10829 :
10830 : #if(_WIN32_WINNT >= 0x0600)
10831 : WINADVAPI
10832 : BOOL
10833 : WINAPI
10834 : AddMandatoryAce (
10835 : __inout PACL pAcl,
10836 : __in DWORD dwAceRevision,
10837 : __in DWORD AceFlags,
10838 : __in DWORD MandatoryPolicy,
10839 : __in PSID pLabelSid
10840 : );
10841 : #endif /* _WIN32_WINNT >= 0x0600 */
10842 :
10843 : WINADVAPI
10844 : BOOL
10845 : WINAPI
10846 : AddAccessDeniedAce (
10847 : __inout PACL pAcl,
10848 : __in DWORD dwAceRevision,
10849 : __in DWORD AccessMask,
10850 : __in PSID pSid
10851 : );
10852 :
10853 : #if(_WIN32_WINNT >= 0x0500)
10854 : WINADVAPI
10855 : BOOL
10856 : WINAPI
10857 : AddAccessDeniedAceEx (
10858 : __inout PACL pAcl,
10859 : __in DWORD dwAceRevision,
10860 : __in DWORD AceFlags,
10861 : __in DWORD AccessMask,
10862 : __in PSID pSid
10863 : );
10864 : #endif /* _WIN32_WINNT >= 0x0500 */
10865 :
10866 : WINADVAPI
10867 : BOOL
10868 : WINAPI
10869 : AddAuditAccessAce(
10870 : __inout PACL pAcl,
10871 : __in DWORD dwAceRevision,
10872 : __in DWORD dwAccessMask,
10873 : __in PSID pSid,
10874 : __in BOOL bAuditSuccess,
10875 : __in BOOL bAuditFailure
10876 : );
10877 :
10878 : #if(_WIN32_WINNT >= 0x0500)
10879 : WINADVAPI
10880 : BOOL
10881 : WINAPI
10882 : AddAuditAccessAceEx(
10883 : __inout PACL pAcl,
10884 : __in DWORD dwAceRevision,
10885 : __in DWORD AceFlags,
10886 : __in DWORD dwAccessMask,
10887 : __in PSID pSid,
10888 : __in BOOL bAuditSuccess,
10889 : __in BOOL bAuditFailure
10890 : );
10891 :
10892 : WINADVAPI
10893 : BOOL
10894 : WINAPI
10895 : AddAccessAllowedObjectAce (
10896 : __inout PACL pAcl,
10897 : __in DWORD dwAceRevision,
10898 : __in DWORD AceFlags,
10899 : __in DWORD AccessMask,
10900 : __in_opt GUID *ObjectTypeGuid,
10901 : __in_opt GUID *InheritedObjectTypeGuid,
10902 : __in PSID pSid
10903 : );
10904 :
10905 : WINADVAPI
10906 : BOOL
10907 : WINAPI
10908 : AddAccessDeniedObjectAce (
10909 : __inout PACL pAcl,
10910 : __in DWORD dwAceRevision,
10911 : __in DWORD AceFlags,
10912 : __in DWORD AccessMask,
10913 : __in_opt GUID *ObjectTypeGuid,
10914 : __in_opt GUID *InheritedObjectTypeGuid,
10915 : __in PSID pSid
10916 : );
10917 :
10918 : WINADVAPI
10919 : BOOL
10920 : WINAPI
10921 : AddAuditAccessObjectAce (
10922 : __inout PACL pAcl,
10923 : __in DWORD dwAceRevision,
10924 : __in DWORD AceFlags,
10925 : __in DWORD AccessMask,
10926 : __in_opt GUID *ObjectTypeGuid,
10927 : __in_opt GUID *InheritedObjectTypeGuid,
10928 : __in PSID pSid,
10929 : __in BOOL bAuditSuccess,
10930 : __in BOOL bAuditFailure
10931 : );
10932 : #endif /* _WIN32_WINNT >= 0x0500 */
10933 :
10934 : WINADVAPI
10935 : BOOL
10936 : WINAPI
10937 : FindFirstFreeAce (
10938 : __in PACL pAcl,
10939 : __deref_out LPVOID *pAce
10940 : );
10941 :
10942 :
10943 : WINADVAPI
10944 : BOOL
10945 : WINAPI
10946 : InitializeSecurityDescriptor (
10947 : __out PSECURITY_DESCRIPTOR pSecurityDescriptor,
10948 : __in DWORD dwRevision
10949 : );
10950 :
10951 :
10952 : WINADVAPI
10953 : BOOL
10954 : WINAPI
10955 : IsValidSecurityDescriptor (
10956 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor
10957 : );
10958 :
10959 : WINADVAPI
10960 : BOOL
10961 : WINAPI
10962 : IsValidRelativeSecurityDescriptor (
10963 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor,
10964 : __in ULONG SecurityDescriptorLength,
10965 : __in SECURITY_INFORMATION RequiredInformation
10966 : );
10967 :
10968 : WINADVAPI
10969 : DWORD
10970 : WINAPI
10971 : GetSecurityDescriptorLength (
10972 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor
10973 : );
10974 :
10975 :
10976 : WINADVAPI
10977 : BOOL
10978 : WINAPI
10979 : GetSecurityDescriptorControl (
10980 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor,
10981 : __out PSECURITY_DESCRIPTOR_CONTROL pControl,
10982 : __out LPDWORD lpdwRevision
10983 : );
10984 :
10985 : #if(_WIN32_WINNT >= 0x0500)
10986 : WINADVAPI
10987 : BOOL
10988 : WINAPI
10989 : SetSecurityDescriptorControl (
10990 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor,
10991 : __in SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,
10992 : __in SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet
10993 : );
10994 : #endif /* _WIN32_WINNT >= 0x0500 */
10995 :
10996 : WINADVAPI
10997 : BOOL
10998 : WINAPI
10999 : SetSecurityDescriptorDacl (
11000 : __inout PSECURITY_DESCRIPTOR pSecurityDescriptor,
11001 : __in BOOL bDaclPresent,
11002 : __in_opt PACL pDacl,
11003 : __in BOOL bDaclDefaulted
11004 : );
11005 :
11006 :
11007 : WINADVAPI
11008 : BOOL
11009 : WINAPI
11010 : GetSecurityDescriptorDacl (
11011 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor,
11012 : __out LPBOOL lpbDaclPresent,
11013 : __deref_out PACL *pDacl,
11014 : __out LPBOOL lpbDaclDefaulted
11015 : );
11016 :
11017 :
11018 : WINADVAPI
11019 : BOOL
11020 : WINAPI
11021 : SetSecurityDescriptorSacl (
11022 : __inout PSECURITY_DESCRIPTOR pSecurityDescriptor,
11023 : __in BOOL bSaclPresent,
11024 : __in_opt PACL pSacl,
11025 : __in BOOL bSaclDefaulted
11026 : );
11027 :
11028 :
11029 : WINADVAPI
11030 : BOOL
11031 : WINAPI
11032 : GetSecurityDescriptorSacl (
11033 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor,
11034 : __out LPBOOL lpbSaclPresent,
11035 : __deref_out PACL *pSacl,
11036 : __out LPBOOL lpbSaclDefaulted
11037 : );
11038 :
11039 :
11040 : WINADVAPI
11041 : BOOL
11042 : WINAPI
11043 : SetSecurityDescriptorOwner (
11044 : __inout PSECURITY_DESCRIPTOR pSecurityDescriptor,
11045 : __in_opt PSID pOwner,
11046 : __in BOOL bOwnerDefaulted
11047 : );
11048 :
11049 :
11050 : WINADVAPI
11051 : BOOL
11052 : WINAPI
11053 : GetSecurityDescriptorOwner (
11054 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor,
11055 : __deref_out PSID *pOwner,
11056 : __out LPBOOL lpbOwnerDefaulted
11057 : );
11058 :
11059 :
11060 : WINADVAPI
11061 : BOOL
11062 : WINAPI
11063 : SetSecurityDescriptorGroup (
11064 : __inout PSECURITY_DESCRIPTOR pSecurityDescriptor,
11065 : __in_opt PSID pGroup,
11066 : __in BOOL bGroupDefaulted
11067 : );
11068 :
11069 :
11070 : WINADVAPI
11071 : BOOL
11072 : WINAPI
11073 : GetSecurityDescriptorGroup (
11074 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor,
11075 : __deref_out PSID *pGroup,
11076 : __out LPBOOL lpbGroupDefaulted
11077 : );
11078 :
11079 :
11080 : WINADVAPI
11081 : DWORD
11082 : WINAPI
11083 : SetSecurityDescriptorRMControl(
11084 : __inout PSECURITY_DESCRIPTOR SecurityDescriptor,
11085 : __in_opt PUCHAR RMControl
11086 : );
11087 :
11088 : WINADVAPI
11089 : DWORD
11090 : WINAPI
11091 : GetSecurityDescriptorRMControl(
11092 : __in PSECURITY_DESCRIPTOR SecurityDescriptor,
11093 : __out PUCHAR RMControl
11094 : );
11095 :
11096 : WINADVAPI
11097 : BOOL
11098 : WINAPI
11099 : CreatePrivateObjectSecurity (
11100 : __in_opt PSECURITY_DESCRIPTOR ParentDescriptor,
11101 : __in_opt PSECURITY_DESCRIPTOR CreatorDescriptor,
11102 : __deref_out PSECURITY_DESCRIPTOR * NewDescriptor,
11103 : __in BOOL IsDirectoryObject,
11104 : __in_opt HANDLE Token,
11105 : __in PGENERIC_MAPPING GenericMapping
11106 : );
11107 :
11108 : #if(_WIN32_WINNT >= 0x0500)
11109 : WINADVAPI
11110 : BOOL
11111 : WINAPI
11112 : ConvertToAutoInheritPrivateObjectSecurity(
11113 : __in_opt PSECURITY_DESCRIPTOR ParentDescriptor,
11114 : __in PSECURITY_DESCRIPTOR CurrentSecurityDescriptor,
11115 : __deref_out PSECURITY_DESCRIPTOR *NewSecurityDescriptor,
11116 : __in_opt GUID *ObjectType,
11117 : __in BOOLEAN IsDirectoryObject,
11118 : __in PGENERIC_MAPPING GenericMapping
11119 : );
11120 :
11121 : WINADVAPI
11122 : BOOL
11123 : WINAPI
11124 : CreatePrivateObjectSecurityEx (
11125 : __in_opt PSECURITY_DESCRIPTOR ParentDescriptor,
11126 : __in_opt PSECURITY_DESCRIPTOR CreatorDescriptor,
11127 : __deref_out PSECURITY_DESCRIPTOR * NewDescriptor,
11128 : __in_opt GUID *ObjectType,
11129 : __in BOOL IsContainerObject,
11130 : __in ULONG AutoInheritFlags,
11131 : __in_opt HANDLE Token,
11132 : __in PGENERIC_MAPPING GenericMapping
11133 : );
11134 :
11135 : WINADVAPI
11136 : BOOL
11137 : WINAPI
11138 : CreatePrivateObjectSecurityWithMultipleInheritance (
11139 : __in_opt PSECURITY_DESCRIPTOR ParentDescriptor,
11140 : __in_opt PSECURITY_DESCRIPTOR CreatorDescriptor,
11141 : __deref_out PSECURITY_DESCRIPTOR * NewDescriptor,
11142 : __in_ecount_opt(GuidCount) GUID **ObjectTypes,
11143 : __in ULONG GuidCount,
11144 : __in BOOL IsContainerObject,
11145 : __in ULONG AutoInheritFlags,
11146 : __in_opt HANDLE Token,
11147 : __in PGENERIC_MAPPING GenericMapping
11148 : );
11149 : #endif /* _WIN32_WINNT >= 0x0500 */
11150 :
11151 : WINADVAPI
11152 : BOOL
11153 : WINAPI
11154 : SetPrivateObjectSecurity (
11155 : __in SECURITY_INFORMATION SecurityInformation,
11156 : __in PSECURITY_DESCRIPTOR ModificationDescriptor,
11157 : __deref_inout PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
11158 : __in PGENERIC_MAPPING GenericMapping,
11159 : __in_opt HANDLE Token
11160 : );
11161 :
11162 : #if(_WIN32_WINNT >= 0x0500)
11163 : WINADVAPI
11164 : BOOL
11165 : WINAPI
11166 : SetPrivateObjectSecurityEx (
11167 : __in SECURITY_INFORMATION SecurityInformation,
11168 : __in PSECURITY_DESCRIPTOR ModificationDescriptor,
11169 : __deref_inout PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
11170 : __in ULONG AutoInheritFlags,
11171 : __in PGENERIC_MAPPING GenericMapping,
11172 : __in_opt HANDLE Token
11173 : );
11174 : #endif /* _WIN32_WINNT >= 0x0500 */
11175 :
11176 : WINADVAPI
11177 : BOOL
11178 : WINAPI
11179 : GetPrivateObjectSecurity (
11180 : __in PSECURITY_DESCRIPTOR ObjectDescriptor,
11181 : __in SECURITY_INFORMATION SecurityInformation,
11182 : __out_bcount_part_opt(DescriptorLength, *ReturnLength) PSECURITY_DESCRIPTOR ResultantDescriptor,
11183 : __in DWORD DescriptorLength,
11184 : __out PDWORD ReturnLength
11185 : );
11186 :
11187 :
11188 : WINADVAPI
11189 : BOOL
11190 : WINAPI
11191 : DestroyPrivateObjectSecurity (
11192 : __deref PSECURITY_DESCRIPTOR * ObjectDescriptor
11193 : );
11194 :
11195 :
11196 : WINADVAPI
11197 : BOOL
11198 : WINAPI
11199 : MakeSelfRelativeSD (
11200 : __in PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
11201 : __out_bcount_part_opt(*lpdwBufferLength, *lpdwBufferLength) PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
11202 : __inout LPDWORD lpdwBufferLength
11203 : );
11204 :
11205 :
11206 : WINADVAPI
11207 : BOOL
11208 : WINAPI
11209 : MakeAbsoluteSD (
11210 : __in PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
11211 : __out_bcount_part_opt(*lpdwAbsoluteSecurityDescriptorSize, *lpdwAbsoluteSecurityDescriptorSize) PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
11212 : __inout LPDWORD lpdwAbsoluteSecurityDescriptorSize,
11213 : __out_bcount_part_opt(*lpdwDaclSize, *lpdwDaclSize) PACL pDacl,
11214 : __inout LPDWORD lpdwDaclSize,
11215 : __out_bcount_part_opt(*lpdwSaclSize, *lpdwSaclSize) PACL pSacl,
11216 : __inout LPDWORD lpdwSaclSize,
11217 : __out_bcount_part_opt(*lpdwOwnerSize, *lpdwOwnerSize) PSID pOwner,
11218 : __inout LPDWORD lpdwOwnerSize,
11219 : __out_bcount_part_opt(*lpdwPrimaryGroupSize, *lpdwPrimaryGroupSize) PSID pPrimaryGroup,
11220 : __inout LPDWORD lpdwPrimaryGroupSize
11221 : );
11222 :
11223 :
11224 : WINADVAPI
11225 : BOOL
11226 : WINAPI
11227 : MakeAbsoluteSD2 (
11228 : __inout_bcount_part(*lpdwBufferSize, *lpdwBufferSize) PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
11229 : __inout LPDWORD lpdwBufferSize
11230 : );
11231 :
11232 : WINADVAPI
11233 : VOID
11234 : WINAPI
11235 : QuerySecurityAccessMask(
11236 : __in SECURITY_INFORMATION SecurityInformation,
11237 : __out LPDWORD DesiredAccess
11238 : );
11239 :
11240 : WINADVAPI
11241 : VOID
11242 : WINAPI
11243 : SetSecurityAccessMask(
11244 : __in SECURITY_INFORMATION SecurityInformation,
11245 : __out LPDWORD DesiredAccess
11246 : );
11247 :
11248 : WINADVAPI
11249 : BOOL
11250 : WINAPI
11251 : SetFileSecurityA (
11252 : __in LPCSTR lpFileName,
11253 : __in SECURITY_INFORMATION SecurityInformation,
11254 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor
11255 : );
11256 : WINADVAPI
11257 : BOOL
11258 : WINAPI
11259 : SetFileSecurityW (
11260 : __in LPCWSTR lpFileName,
11261 : __in SECURITY_INFORMATION SecurityInformation,
11262 : __in PSECURITY_DESCRIPTOR pSecurityDescriptor
11263 : );
11264 : #ifdef UNICODE
11265 : #define SetFileSecurity SetFileSecurityW
11266 : #else
11267 : #define SetFileSecurity SetFileSecurityA
11268 : #endif // !UNICODE
11269 :
11270 :
11271 : WINADVAPI
11272 : BOOL
11273 : WINAPI
11274 : GetFileSecurityA (
11275 : __in LPCSTR lpFileName,
11276 : __in SECURITY_INFORMATION RequestedInformation,
11277 : __out_bcount_part_opt(nLength, *lpnLengthNeeded) PSECURITY_DESCRIPTOR pSecurityDescriptor,
11278 : __in DWORD nLength,
11279 : __out LPDWORD lpnLengthNeeded
11280 : );
11281 : WINADVAPI
11282 : BOOL
11283 : WINAPI
11284 : GetFileSecurityW (
11285 : __in LPCWSTR lpFileName,
11286 : __in SECURITY_INFORMATION RequestedInformation,
11287 : __out_bcount_part_opt(nLength, *lpnLengthNeeded) PSECURITY_DESCRIPTOR pSecurityDescriptor,
11288 : __in DWORD nLength,
11289 : __out LPDWORD lpnLengthNeeded
11290 : );
11291 : #ifdef UNICODE
11292 : #define GetFileSecurity GetFileSecurityW
11293 : #else
11294 : #define GetFileSecurity GetFileSecurityA
11295 : #endif // !UNICODE
11296 :
11297 :
11298 : WINADVAPI
11299 : BOOL
11300 : WINAPI
11301 : SetKernelObjectSecurity (
11302 : __in HANDLE Handle,
11303 : __in SECURITY_INFORMATION SecurityInformation,
11304 : __in PSECURITY_DESCRIPTOR SecurityDescriptor
11305 : );
11306 :
11307 : WINBASEAPI
11308 : __out
11309 : HANDLE
11310 : WINAPI
11311 : FindFirstChangeNotificationA(
11312 : __in LPCSTR lpPathName,
11313 : __in BOOL bWatchSubtree,
11314 : __in DWORD dwNotifyFilter
11315 : );
11316 : WINBASEAPI
11317 : __out
11318 : HANDLE
11319 : WINAPI
11320 : FindFirstChangeNotificationW(
11321 : __in LPCWSTR lpPathName,
11322 : __in BOOL bWatchSubtree,
11323 : __in DWORD dwNotifyFilter
11324 : );
11325 : #ifdef UNICODE
11326 : #define FindFirstChangeNotification FindFirstChangeNotificationW
11327 : #else
11328 : #define FindFirstChangeNotification FindFirstChangeNotificationA
11329 : #endif // !UNICODE
11330 :
11331 : WINBASEAPI
11332 : BOOL
11333 : WINAPI
11334 : FindNextChangeNotification(
11335 : __in HANDLE hChangeHandle
11336 : );
11337 :
11338 : WINBASEAPI
11339 : BOOL
11340 : WINAPI
11341 : FindCloseChangeNotification(
11342 : __in HANDLE hChangeHandle
11343 : );
11344 :
11345 : #if(_WIN32_WINNT >= 0x0400)
11346 : WINBASEAPI
11347 : BOOL
11348 : WINAPI
11349 : ReadDirectoryChangesW(
11350 : __in HANDLE hDirectory,
11351 : __out_bcount_part(nBufferLength, *lpBytesReturned) LPVOID lpBuffer,
11352 : __in DWORD nBufferLength,
11353 : __in BOOL bWatchSubtree,
11354 : __in DWORD dwNotifyFilter,
11355 : __out_opt LPDWORD lpBytesReturned,
11356 : __inout_opt LPOVERLAPPED lpOverlapped,
11357 : __in_opt LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
11358 : );
11359 : #endif /* _WIN32_WINNT >= 0x0400 */
11360 :
11361 : WINBASEAPI
11362 : BOOL
11363 : WINAPI
11364 : VirtualLock(
11365 : __in LPVOID lpAddress,
11366 : __in SIZE_T dwSize
11367 : );
11368 :
11369 : WINBASEAPI
11370 : BOOL
11371 : WINAPI
11372 : VirtualUnlock(
11373 : __in LPVOID lpAddress,
11374 : __in SIZE_T dwSize
11375 : );
11376 :
11377 : WINBASEAPI
11378 : __out_opt __out_data_source(FILE)
11379 : LPVOID
11380 : WINAPI
11381 : MapViewOfFileEx(
11382 : __in HANDLE hFileMappingObject,
11383 : __in DWORD dwDesiredAccess,
11384 : __in DWORD dwFileOffsetHigh,
11385 : __in DWORD dwFileOffsetLow,
11386 : __in SIZE_T dwNumberOfBytesToMap,
11387 : __in_opt LPVOID lpBaseAddress
11388 : );
11389 :
11390 : #if _WIN32_WINNT >= 0x0600
11391 :
11392 : WINBASEAPI
11393 : __out __out_data_source(FILE)
11394 : LPVOID
11395 : WINAPI
11396 : MapViewOfFileExNuma(
11397 : __in HANDLE hFileMappingObject,
11398 : __in DWORD dwDesiredAccess,
11399 : __in DWORD dwFileOffsetHigh,
11400 : __in DWORD dwFileOffsetLow,
11401 : __in SIZE_T dwNumberOfBytesToMap,
11402 : __in_opt LPVOID lpBaseAddress,
11403 : __in DWORD nndPreferred
11404 : );
11405 :
11406 : #endif // _WIN32_WINNT >= 0x0600
11407 :
11408 : WINBASEAPI
11409 : BOOL
11410 : WINAPI
11411 : SetPriorityClass(
11412 : __in HANDLE hProcess,
11413 : __in DWORD dwPriorityClass
11414 : );
11415 :
11416 : WINBASEAPI
11417 : DWORD
11418 : WINAPI
11419 : GetPriorityClass(
11420 : __in HANDLE hProcess
11421 : );
11422 :
11423 : WINBASEAPI
11424 : BOOL
11425 : WINAPI
11426 : IsBadReadPtr(
11427 : __in_opt CONST VOID *lp,
11428 : __in UINT_PTR ucb
11429 : );
11430 :
11431 : WINBASEAPI
11432 : BOOL
11433 : WINAPI
11434 : IsBadWritePtr(
11435 : __in_opt LPVOID lp,
11436 : __in UINT_PTR ucb
11437 : );
11438 :
11439 : WINBASEAPI
11440 : BOOL
11441 : WINAPI
11442 : IsBadHugeReadPtr(
11443 : __in_opt CONST VOID *lp,
11444 : __in UINT_PTR ucb
11445 : );
11446 :
11447 : WINBASEAPI
11448 : BOOL
11449 : WINAPI
11450 : IsBadHugeWritePtr(
11451 : __in_opt LPVOID lp,
11452 : __in UINT_PTR ucb
11453 : );
11454 :
11455 : WINBASEAPI
11456 : BOOL
11457 : WINAPI
11458 : IsBadCodePtr(
11459 : __in_opt FARPROC lpfn
11460 : );
11461 :
11462 : WINBASEAPI
11463 : BOOL
11464 : WINAPI
11465 : IsBadStringPtrA(
11466 : __in_opt LPCSTR lpsz,
11467 : __in UINT_PTR ucchMax
11468 : );
11469 : WINBASEAPI
11470 : BOOL
11471 : WINAPI
11472 : IsBadStringPtrW(
11473 : __in_opt LPCWSTR lpsz,
11474 : __in UINT_PTR ucchMax
11475 : );
11476 : #ifdef UNICODE
11477 : #define IsBadStringPtr IsBadStringPtrW
11478 : #else
11479 : #define IsBadStringPtr IsBadStringPtrA
11480 : #endif // !UNICODE
11481 :
11482 : WINADVAPI
11483 : BOOL
11484 : WINAPI
11485 : LookupAccountSidA(
11486 : __in_opt LPCSTR lpSystemName,
11487 : __in PSID Sid,
11488 : __out_ecount_part_opt(*cchName, *cchName + 1) LPSTR Name,
11489 : __inout LPDWORD cchName,
11490 : __out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPSTR ReferencedDomainName,
11491 : __inout LPDWORD cchReferencedDomainName,
11492 : __out PSID_NAME_USE peUse
11493 : );
11494 : WINADVAPI
11495 : BOOL
11496 : WINAPI
11497 : LookupAccountSidW(
11498 : __in_opt LPCWSTR lpSystemName,
11499 : __in PSID Sid,
11500 : __out_ecount_part_opt(*cchName, *cchName + 1) LPWSTR Name,
11501 : __inout LPDWORD cchName,
11502 : __out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPWSTR ReferencedDomainName,
11503 : __inout LPDWORD cchReferencedDomainName,
11504 : __out PSID_NAME_USE peUse
11505 : );
11506 : #ifdef UNICODE
11507 : #define LookupAccountSid LookupAccountSidW
11508 : #else
11509 : #define LookupAccountSid LookupAccountSidA
11510 : #endif // !UNICODE
11511 :
11512 : WINADVAPI
11513 : BOOL
11514 : WINAPI
11515 : LookupAccountNameA(
11516 : __in_opt LPCSTR lpSystemName,
11517 : __in LPCSTR lpAccountName,
11518 : __out_bcount_part_opt(*cbSid, *cbSid) PSID Sid,
11519 : __inout LPDWORD cbSid,
11520 : __out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPSTR ReferencedDomainName,
11521 : __inout LPDWORD cchReferencedDomainName,
11522 : __out PSID_NAME_USE peUse
11523 : );
11524 : WINADVAPI
11525 : BOOL
11526 : WINAPI
11527 : LookupAccountNameW(
11528 : __in_opt LPCWSTR lpSystemName,
11529 : __in LPCWSTR lpAccountName,
11530 : __out_bcount_part_opt(*cbSid, *cbSid) PSID Sid,
11531 : __inout LPDWORD cbSid,
11532 : __out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPWSTR ReferencedDomainName,
11533 : __inout LPDWORD cchReferencedDomainName,
11534 : __out PSID_NAME_USE peUse
11535 : );
11536 : #ifdef UNICODE
11537 : #define LookupAccountName LookupAccountNameW
11538 : #else
11539 : #define LookupAccountName LookupAccountNameA
11540 : #endif // !UNICODE
11541 :
11542 : WINADVAPI
11543 : BOOL
11544 : WINAPI
11545 : LookupPrivilegeValueA(
11546 : __in_opt LPCSTR lpSystemName,
11547 : __in LPCSTR lpName,
11548 : __out PLUID lpLuid
11549 : );
11550 : WINADVAPI
11551 : BOOL
11552 : WINAPI
11553 : LookupPrivilegeValueW(
11554 : __in_opt LPCWSTR lpSystemName,
11555 : __in LPCWSTR lpName,
11556 : __out PLUID lpLuid
11557 : );
11558 : #ifdef UNICODE
11559 : #define LookupPrivilegeValue LookupPrivilegeValueW
11560 : #else
11561 : #define LookupPrivilegeValue LookupPrivilegeValueA
11562 : #endif // !UNICODE
11563 :
11564 : WINADVAPI
11565 : BOOL
11566 : WINAPI
11567 : LookupPrivilegeNameA(
11568 : __in_opt LPCSTR lpSystemName,
11569 : __in PLUID lpLuid,
11570 : __out_ecount_part_opt(*cchName, *cchName + 1) LPSTR lpName,
11571 : __inout LPDWORD cchName
11572 : );
11573 : WINADVAPI
11574 : BOOL
11575 : WINAPI
11576 : LookupPrivilegeNameW(
11577 : __in_opt LPCWSTR lpSystemName,
11578 : __in PLUID lpLuid,
11579 : __out_ecount_part_opt(*cchName, *cchName + 1) LPWSTR lpName,
11580 : __inout LPDWORD cchName
11581 : );
11582 : #ifdef UNICODE
11583 : #define LookupPrivilegeName LookupPrivilegeNameW
11584 : #else
11585 : #define LookupPrivilegeName LookupPrivilegeNameA
11586 : #endif // !UNICODE
11587 :
11588 : WINADVAPI
11589 : BOOL
11590 : WINAPI
11591 : LookupPrivilegeDisplayNameA(
11592 : __in_opt LPCSTR lpSystemName,
11593 : __in LPCSTR lpName,
11594 : __out_ecount_part_opt(*cchDisplayName, *cchDisplayName + 1) LPSTR lpDisplayName,
11595 : __inout LPDWORD cchDisplayName,
11596 : __out LPDWORD lpLanguageId
11597 : );
11598 : WINADVAPI
11599 : BOOL
11600 : WINAPI
11601 : LookupPrivilegeDisplayNameW(
11602 : __in_opt LPCWSTR lpSystemName,
11603 : __in LPCWSTR lpName,
11604 : __out_ecount_part_opt(*cchDisplayName, *cchDisplayName + 1) LPWSTR lpDisplayName,
11605 : __inout LPDWORD cchDisplayName,
11606 : __out LPDWORD lpLanguageId
11607 : );
11608 : #ifdef UNICODE
11609 : #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW
11610 : #else
11611 : #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameA
11612 : #endif // !UNICODE
11613 :
11614 : WINADVAPI
11615 : BOOL
11616 : WINAPI
11617 : AllocateLocallyUniqueId(
11618 : __out PLUID Luid
11619 : );
11620 :
11621 : WINBASEAPI
11622 : BOOL
11623 : WINAPI
11624 : BuildCommDCBA(
11625 : __in LPCSTR lpDef,
11626 : __out LPDCB lpDCB
11627 : );
11628 : WINBASEAPI
11629 : BOOL
11630 : WINAPI
11631 : BuildCommDCBW(
11632 : __in LPCWSTR lpDef,
11633 : __out LPDCB lpDCB
11634 : );
11635 : #ifdef UNICODE
11636 : #define BuildCommDCB BuildCommDCBW
11637 : #else
11638 : #define BuildCommDCB BuildCommDCBA
11639 : #endif // !UNICODE
11640 :
11641 : WINBASEAPI
11642 : BOOL
11643 : WINAPI
11644 : BuildCommDCBAndTimeoutsA(
11645 : __in LPCSTR lpDef,
11646 : __out LPDCB lpDCB,
11647 : __out LPCOMMTIMEOUTS lpCommTimeouts
11648 : );
11649 : WINBASEAPI
11650 : BOOL
11651 : WINAPI
11652 : BuildCommDCBAndTimeoutsW(
11653 : __in LPCWSTR lpDef,
11654 : __out LPDCB lpDCB,
11655 : __out LPCOMMTIMEOUTS lpCommTimeouts
11656 : );
11657 : #ifdef UNICODE
11658 : #define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsW
11659 : #else
11660 : #define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsA
11661 : #endif // !UNICODE
11662 :
11663 : WINBASEAPI
11664 : BOOL
11665 : WINAPI
11666 : CommConfigDialogA(
11667 : __in LPCSTR lpszName,
11668 : __in_opt HWND hWnd,
11669 : __inout LPCOMMCONFIG lpCC
11670 : );
11671 : WINBASEAPI
11672 : BOOL
11673 : WINAPI
11674 : CommConfigDialogW(
11675 : __in LPCWSTR lpszName,
11676 : __in_opt HWND hWnd,
11677 : __inout LPCOMMCONFIG lpCC
11678 : );
11679 : #ifdef UNICODE
11680 : #define CommConfigDialog CommConfigDialogW
11681 : #else
11682 : #define CommConfigDialog CommConfigDialogA
11683 : #endif // !UNICODE
11684 :
11685 : WINBASEAPI
11686 : BOOL
11687 : WINAPI
11688 : GetDefaultCommConfigA(
11689 : __in LPCSTR lpszName,
11690 : __out_bcount_part(*lpdwSize, *lpdwSize) LPCOMMCONFIG lpCC,
11691 : __inout LPDWORD lpdwSize
11692 : );
11693 : WINBASEAPI
11694 : BOOL
11695 : WINAPI
11696 : GetDefaultCommConfigW(
11697 : __in LPCWSTR lpszName,
11698 : __out_bcount_part(*lpdwSize, *lpdwSize) LPCOMMCONFIG lpCC,
11699 : __inout LPDWORD lpdwSize
11700 : );
11701 : #ifdef UNICODE
11702 : #define GetDefaultCommConfig GetDefaultCommConfigW
11703 : #else
11704 : #define GetDefaultCommConfig GetDefaultCommConfigA
11705 : #endif // !UNICODE
11706 :
11707 : WINBASEAPI
11708 : BOOL
11709 : WINAPI
11710 : SetDefaultCommConfigA(
11711 : __in LPCSTR lpszName,
11712 : __in_bcount(dwSize) LPCOMMCONFIG lpCC,
11713 : __in DWORD dwSize
11714 : );
11715 : WINBASEAPI
11716 : BOOL
11717 : WINAPI
11718 : SetDefaultCommConfigW(
11719 : __in LPCWSTR lpszName,
11720 : __in_bcount(dwSize) LPCOMMCONFIG lpCC,
11721 : __in DWORD dwSize
11722 : );
11723 : #ifdef UNICODE
11724 : #define SetDefaultCommConfig SetDefaultCommConfigW
11725 : #else
11726 : #define SetDefaultCommConfig SetDefaultCommConfigA
11727 : #endif // !UNICODE
11728 :
11729 : #ifndef _MAC
11730 : #define MAX_COMPUTERNAME_LENGTH 15
11731 : #else
11732 : #define MAX_COMPUTERNAME_LENGTH 31
11733 : #endif
11734 :
11735 : WINBASEAPI
11736 : __success(return != 0)
11737 : BOOL
11738 : WINAPI
11739 : GetComputerNameA (
11740 : __out_ecount_part_opt(*nSize, *nSize + 1) __out_has_type_adt_props(SAL_ValidCompNameT) LPSTR lpBuffer,
11741 : __inout LPDWORD nSize
11742 : );
11743 : WINBASEAPI
11744 : __success(return != 0)
11745 : BOOL
11746 : WINAPI
11747 : GetComputerNameW (
11748 : __out_ecount_part_opt(*nSize, *nSize + 1) __out_has_type_adt_props(SAL_ValidCompNameT) LPWSTR lpBuffer,
11749 : __inout LPDWORD nSize
11750 : );
11751 : #ifdef UNICODE
11752 : #define GetComputerName GetComputerNameW
11753 : #else
11754 : #define GetComputerName GetComputerNameA
11755 : #endif // !UNICODE
11756 :
11757 : WINBASEAPI
11758 : BOOL
11759 : WINAPI
11760 : SetComputerNameA (
11761 : __in LPCSTR lpComputerName
11762 : );
11763 : WINBASEAPI
11764 : BOOL
11765 : WINAPI
11766 : SetComputerNameW (
11767 : __in LPCWSTR lpComputerName
11768 : );
11769 : #ifdef UNICODE
11770 : #define SetComputerName SetComputerNameW
11771 : #else
11772 : #define SetComputerName SetComputerNameA
11773 : #endif // !UNICODE
11774 :
11775 :
11776 : #if (_WIN32_WINNT >= 0x0500)
11777 :
11778 : typedef enum _COMPUTER_NAME_FORMAT {
11779 : ComputerNameNetBIOS,
11780 : ComputerNameDnsHostname,
11781 : ComputerNameDnsDomain,
11782 : ComputerNameDnsFullyQualified,
11783 : ComputerNamePhysicalNetBIOS,
11784 : ComputerNamePhysicalDnsHostname,
11785 : ComputerNamePhysicalDnsDomain,
11786 : ComputerNamePhysicalDnsFullyQualified,
11787 : ComputerNameMax
11788 : } COMPUTER_NAME_FORMAT ;
11789 :
11790 : WINBASEAPI
11791 : __success(return != 0)
11792 : BOOL
11793 : WINAPI
11794 : GetComputerNameExA (
11795 : __in COMPUTER_NAME_FORMAT NameType,
11796 : __out_ecount_part_opt(*nSize, *nSize + 1) LPSTR lpBuffer,
11797 : __inout LPDWORD nSize
11798 : );
11799 : WINBASEAPI
11800 : __success(return != 0)
11801 : BOOL
11802 : WINAPI
11803 : GetComputerNameExW (
11804 : __in COMPUTER_NAME_FORMAT NameType,
11805 : __out_ecount_part_opt(*nSize, *nSize + 1) LPWSTR lpBuffer,
11806 : __inout LPDWORD nSize
11807 : );
11808 : #ifdef UNICODE
11809 : #define GetComputerNameEx GetComputerNameExW
11810 : #else
11811 : #define GetComputerNameEx GetComputerNameExA
11812 : #endif // !UNICODE
11813 :
11814 : WINBASEAPI
11815 : BOOL
11816 : WINAPI
11817 : SetComputerNameExA (
11818 : __in COMPUTER_NAME_FORMAT NameType,
11819 : __in LPCSTR lpBuffer
11820 : );
11821 : WINBASEAPI
11822 : BOOL
11823 : WINAPI
11824 : SetComputerNameExW (
11825 : __in COMPUTER_NAME_FORMAT NameType,
11826 : __in LPCWSTR lpBuffer
11827 : );
11828 : #ifdef UNICODE
11829 : #define SetComputerNameEx SetComputerNameExW
11830 : #else
11831 : #define SetComputerNameEx SetComputerNameExA
11832 : #endif // !UNICODE
11833 :
11834 :
11835 : WINBASEAPI
11836 : __success(return == TRUE)
11837 : BOOL
11838 : WINAPI
11839 : DnsHostnameToComputerNameA (
11840 : __in LPCSTR Hostname,
11841 : __out_ecount_part_opt(*nSize, *nSize + 1) __out_has_type_adt_props(SAL_ValidCompNameT) LPSTR ComputerName,
11842 : __inout LPDWORD nSize
11843 : );
11844 : WINBASEAPI
11845 : __success(return == TRUE)
11846 : BOOL
11847 : WINAPI
11848 : DnsHostnameToComputerNameW (
11849 : __in LPCWSTR Hostname,
11850 : __out_ecount_part_opt(*nSize, *nSize + 1) __out_has_type_adt_props(SAL_ValidCompNameT) LPWSTR ComputerName,
11851 : __inout LPDWORD nSize
11852 : );
11853 : #ifdef UNICODE
11854 : #define DnsHostnameToComputerName DnsHostnameToComputerNameW
11855 : #else
11856 : #define DnsHostnameToComputerName DnsHostnameToComputerNameA
11857 : #endif // !UNICODE
11858 :
11859 : #endif // _WIN32_WINNT
11860 :
11861 : WINADVAPI
11862 : BOOL
11863 : WINAPI
11864 : GetUserNameA (
11865 : __out_ecount_part_opt(*pcbBuffer, *pcbBuffer) LPSTR lpBuffer,
11866 : __inout LPDWORD pcbBuffer
11867 : );
11868 : WINADVAPI
11869 : BOOL
11870 : WINAPI
11871 : GetUserNameW (
11872 : __out_ecount_part_opt(*pcbBuffer, *pcbBuffer) LPWSTR lpBuffer,
11873 : __inout LPDWORD pcbBuffer
11874 : );
11875 : #ifdef UNICODE
11876 : #define GetUserName GetUserNameW
11877 : #else
11878 : #define GetUserName GetUserNameA
11879 : #endif // !UNICODE
11880 :
11881 : //
11882 : // Logon Support APIs
11883 : //
11884 :
11885 : #define LOGON32_LOGON_INTERACTIVE 2
11886 : #define LOGON32_LOGON_NETWORK 3
11887 : #define LOGON32_LOGON_BATCH 4
11888 : #define LOGON32_LOGON_SERVICE 5
11889 : #define LOGON32_LOGON_UNLOCK 7
11890 : #if(_WIN32_WINNT >= 0x0500)
11891 : #define LOGON32_LOGON_NETWORK_CLEARTEXT 8
11892 : #define LOGON32_LOGON_NEW_CREDENTIALS 9
11893 : #endif // (_WIN32_WINNT >= 0x0500)
11894 :
11895 : #define LOGON32_PROVIDER_DEFAULT 0
11896 : #define LOGON32_PROVIDER_WINNT35 1
11897 : #if(_WIN32_WINNT >= 0x0400)
11898 : #define LOGON32_PROVIDER_WINNT40 2
11899 : #endif /* _WIN32_WINNT >= 0x0400 */
11900 : #if(_WIN32_WINNT >= 0x0500)
11901 : #define LOGON32_PROVIDER_WINNT50 3
11902 : #endif // (_WIN32_WINNT >= 0x0500)
11903 :
11904 :
11905 :
11906 : WINADVAPI
11907 : BOOL
11908 : WINAPI
11909 : LogonUserA (
11910 : __in LPCSTR lpszUsername,
11911 : __in_opt LPCSTR lpszDomain,
11912 : __in LPCSTR lpszPassword,
11913 : __in DWORD dwLogonType,
11914 : __in DWORD dwLogonProvider,
11915 : __deref_out PHANDLE phToken
11916 : );
11917 : WINADVAPI
11918 : BOOL
11919 : WINAPI
11920 : LogonUserW (
11921 : __in LPCWSTR lpszUsername,
11922 : __in_opt LPCWSTR lpszDomain,
11923 : __in LPCWSTR lpszPassword,
11924 : __in DWORD dwLogonType,
11925 : __in DWORD dwLogonProvider,
11926 : __deref_out PHANDLE phToken
11927 : );
11928 : #ifdef UNICODE
11929 : #define LogonUser LogonUserW
11930 : #else
11931 : #define LogonUser LogonUserA
11932 : #endif // !UNICODE
11933 :
11934 : WINADVAPI
11935 : BOOL
11936 : WINAPI
11937 : LogonUserExA (
11938 : __in LPCSTR lpszUsername,
11939 : __in_opt LPCSTR lpszDomain,
11940 : __in LPCSTR lpszPassword,
11941 : __in DWORD dwLogonType,
11942 : __in DWORD dwLogonProvider,
11943 : __deref_opt_out PHANDLE phToken,
11944 : __deref_opt_out PSID *ppLogonSid,
11945 : __deref_opt_out_bcount_full(*pdwProfileLength) PVOID *ppProfileBuffer,
11946 : __out_opt LPDWORD pdwProfileLength,
11947 : __out_opt PQUOTA_LIMITS pQuotaLimits
11948 : );
11949 : WINADVAPI
11950 : BOOL
11951 : WINAPI
11952 : LogonUserExW (
11953 : __in LPCWSTR lpszUsername,
11954 : __in_opt LPCWSTR lpszDomain,
11955 : __in LPCWSTR lpszPassword,
11956 : __in DWORD dwLogonType,
11957 : __in DWORD dwLogonProvider,
11958 : __deref_opt_out PHANDLE phToken,
11959 : __deref_opt_out PSID *ppLogonSid,
11960 : __deref_opt_out_bcount_full(*pdwProfileLength) PVOID *ppProfileBuffer,
11961 : __out_opt LPDWORD pdwProfileLength,
11962 : __out_opt PQUOTA_LIMITS pQuotaLimits
11963 : );
11964 : #ifdef UNICODE
11965 : #define LogonUserEx LogonUserExW
11966 : #else
11967 : #define LogonUserEx LogonUserExA
11968 : #endif // !UNICODE
11969 :
11970 :
11971 : #if(_WIN32_WINNT >= 0x0600)
11972 :
11973 :
11974 : #endif // (_WIN32_WINNT >= 0x0600)
11975 :
11976 : WINADVAPI
11977 : BOOL
11978 : WINAPI
11979 : ImpersonateLoggedOnUser(
11980 : __in HANDLE hToken
11981 : );
11982 :
11983 : WINADVAPI
11984 : BOOL
11985 : WINAPI
11986 : CreateProcessAsUserA (
11987 : __in_opt HANDLE hToken,
11988 : __in_opt LPCSTR lpApplicationName,
11989 : __inout_opt LPSTR lpCommandLine,
11990 : __in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes,
11991 : __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
11992 : __in BOOL bInheritHandles,
11993 : __in DWORD dwCreationFlags,
11994 : __in_opt LPVOID lpEnvironment,
11995 : __in_opt LPCSTR lpCurrentDirectory,
11996 : __in LPSTARTUPINFOA lpStartupInfo,
11997 : __out LPPROCESS_INFORMATION lpProcessInformation
11998 : );
11999 : WINADVAPI
12000 : BOOL
12001 : WINAPI
12002 : CreateProcessAsUserW (
12003 : __in_opt HANDLE hToken,
12004 : __in_opt LPCWSTR lpApplicationName,
12005 : __inout_opt LPWSTR lpCommandLine,
12006 : __in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes,
12007 : __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
12008 : __in BOOL bInheritHandles,
12009 : __in DWORD dwCreationFlags,
12010 : __in_opt LPVOID lpEnvironment,
12011 : __in_opt LPCWSTR lpCurrentDirectory,
12012 : __in LPSTARTUPINFOW lpStartupInfo,
12013 : __out LPPROCESS_INFORMATION lpProcessInformation
12014 : );
12015 : #ifdef UNICODE
12016 : #define CreateProcessAsUser CreateProcessAsUserW
12017 : #else
12018 : #define CreateProcessAsUser CreateProcessAsUserA
12019 : #endif // !UNICODE
12020 :
12021 :
12022 : #if(_WIN32_WINNT >= 0x0500)
12023 :
12024 : //
12025 : // LogonFlags
12026 : //
12027 : #define LOGON_WITH_PROFILE 0x00000001
12028 : #define LOGON_NETCREDENTIALS_ONLY 0x00000002
12029 : #define LOGON_ZERO_PASSWORD_BUFFER 0x80000000
12030 :
12031 : WINADVAPI
12032 : BOOL
12033 : WINAPI
12034 : CreateProcessWithLogonW(
12035 : __in LPCWSTR lpUsername,
12036 : __in_opt LPCWSTR lpDomain,
12037 : __in LPCWSTR lpPassword,
12038 : __in DWORD dwLogonFlags,
12039 : __in_opt LPCWSTR lpApplicationName,
12040 : __inout_opt LPWSTR lpCommandLine,
12041 : __in DWORD dwCreationFlags,
12042 : __in_opt LPVOID lpEnvironment,
12043 : __in_opt LPCWSTR lpCurrentDirectory,
12044 : __in LPSTARTUPINFOW lpStartupInfo,
12045 : __out LPPROCESS_INFORMATION lpProcessInformation
12046 : );
12047 :
12048 : WINADVAPI
12049 : BOOL
12050 : WINAPI
12051 : CreateProcessWithTokenW(
12052 : __in HANDLE hToken,
12053 : __in DWORD dwLogonFlags,
12054 : __in_opt LPCWSTR lpApplicationName,
12055 : __inout_opt LPWSTR lpCommandLine,
12056 : __in DWORD dwCreationFlags,
12057 : __in_opt LPVOID lpEnvironment,
12058 : __in_opt LPCWSTR lpCurrentDirectory,
12059 : __in LPSTARTUPINFOW lpStartupInfo,
12060 : __out LPPROCESS_INFORMATION lpProcessInformation
12061 : );
12062 :
12063 : #endif // (_WIN32_WINNT >= 0x0500)
12064 :
12065 : WINADVAPI
12066 : BOOL
12067 : APIENTRY
12068 : ImpersonateAnonymousToken(
12069 : __in HANDLE ThreadHandle
12070 : );
12071 :
12072 : WINADVAPI
12073 : BOOL
12074 : WINAPI
12075 : DuplicateTokenEx(
12076 : __in HANDLE hExistingToken,
12077 : __in DWORD dwDesiredAccess,
12078 : __in_opt LPSECURITY_ATTRIBUTES lpTokenAttributes,
12079 : __in SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
12080 : __in TOKEN_TYPE TokenType,
12081 : __deref_out PHANDLE phNewToken);
12082 :
12083 : WINADVAPI
12084 : BOOL
12085 : APIENTRY
12086 : CreateRestrictedToken(
12087 : __in HANDLE ExistingTokenHandle,
12088 : __in DWORD Flags,
12089 : __in DWORD DisableSidCount,
12090 : __in_ecount_opt(DisableSidCount) PSID_AND_ATTRIBUTES SidsToDisable,
12091 : __in DWORD DeletePrivilegeCount,
12092 : __in_ecount_opt(DeletePrivilegeCount) PLUID_AND_ATTRIBUTES PrivilegesToDelete,
12093 : __in DWORD RestrictedSidCount,
12094 : __in_ecount_opt(RestrictedSidCount) PSID_AND_ATTRIBUTES SidsToRestrict,
12095 : __deref_out PHANDLE NewTokenHandle
12096 : );
12097 :
12098 :
12099 : WINADVAPI
12100 : BOOL
12101 : WINAPI
12102 : IsTokenRestricted(
12103 : __in HANDLE TokenHandle
12104 : );
12105 :
12106 : WINADVAPI
12107 : BOOL
12108 : WINAPI
12109 : IsTokenUntrusted(
12110 : __in HANDLE TokenHandle
12111 : );
12112 :
12113 : WINADVAPI
12114 : BOOL
12115 : APIENTRY
12116 : CheckTokenMembership(
12117 : __in_opt HANDLE TokenHandle,
12118 : __in PSID SidToCheck,
12119 : __out PBOOL IsMember
12120 : );
12121 :
12122 : //
12123 : // Thread pool API's
12124 : //
12125 :
12126 : #if (_WIN32_WINNT >= 0x0500)
12127 :
12128 : typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK ;
12129 :
12130 : WINBASEAPI
12131 : BOOL
12132 : WINAPI
12133 : RegisterWaitForSingleObject(
12134 : __deref_out PHANDLE phNewWaitObject,
12135 : __in HANDLE hObject,
12136 : __in WAITORTIMERCALLBACK Callback,
12137 : __in_opt PVOID Context,
12138 : __in ULONG dwMilliseconds,
12139 : __in ULONG dwFlags
12140 : );
12141 :
12142 : WINBASEAPI
12143 : HANDLE
12144 : WINAPI
12145 : RegisterWaitForSingleObjectEx(
12146 : __in HANDLE hObject,
12147 : __in WAITORTIMERCALLBACK Callback,
12148 : __in_opt PVOID Context,
12149 : __in ULONG dwMilliseconds,
12150 : __in ULONG dwFlags
12151 : );
12152 :
12153 : WINBASEAPI
12154 : __checkReturn
12155 : BOOL
12156 : WINAPI
12157 : UnregisterWait(
12158 : __in HANDLE WaitHandle
12159 : );
12160 :
12161 : WINBASEAPI
12162 : __checkReturn
12163 : BOOL
12164 : WINAPI
12165 : UnregisterWaitEx(
12166 : __in HANDLE WaitHandle,
12167 : __in_opt HANDLE CompletionEvent
12168 : );
12169 :
12170 : WINBASEAPI
12171 : BOOL
12172 : WINAPI
12173 : QueueUserWorkItem(
12174 : __in LPTHREAD_START_ROUTINE Function,
12175 : __in_opt PVOID Context,
12176 : __in ULONG Flags
12177 : );
12178 :
12179 : WINBASEAPI
12180 : BOOL
12181 : WINAPI
12182 : BindIoCompletionCallback (
12183 : __in HANDLE FileHandle,
12184 : __in LPOVERLAPPED_COMPLETION_ROUTINE Function,
12185 : __in ULONG Flags
12186 : );
12187 :
12188 : WINBASEAPI
12189 : __out_opt
12190 : HANDLE
12191 : WINAPI
12192 : CreateTimerQueue(
12193 : VOID
12194 : );
12195 :
12196 : WINBASEAPI
12197 : BOOL
12198 : WINAPI
12199 : CreateTimerQueueTimer(
12200 : __deref_out PHANDLE phNewTimer,
12201 : __in_opt HANDLE TimerQueue,
12202 : __in WAITORTIMERCALLBACK Callback,
12203 : __in_opt PVOID Parameter,
12204 : __in DWORD DueTime,
12205 : __in DWORD Period,
12206 : __in ULONG Flags
12207 : ) ;
12208 :
12209 : WINBASEAPI
12210 : __checkReturn
12211 : BOOL
12212 : WINAPI
12213 : ChangeTimerQueueTimer(
12214 : __in_opt HANDLE TimerQueue,
12215 : __inout HANDLE Timer,
12216 : __in ULONG DueTime,
12217 : __in ULONG Period
12218 : );
12219 :
12220 : WINBASEAPI
12221 : __checkReturn
12222 : BOOL
12223 : WINAPI
12224 : DeleteTimerQueueTimer(
12225 : __in_opt HANDLE TimerQueue,
12226 : __in HANDLE Timer,
12227 : __in_opt HANDLE CompletionEvent
12228 : );
12229 :
12230 : WINBASEAPI
12231 : __checkReturn
12232 : BOOL
12233 : WINAPI
12234 : DeleteTimerQueueEx(
12235 : __in HANDLE TimerQueue,
12236 : __in_opt HANDLE CompletionEvent
12237 : );
12238 :
12239 : WINBASEAPI
12240 : HANDLE
12241 : WINAPI
12242 : SetTimerQueueTimer(
12243 : __in_opt HANDLE TimerQueue,
12244 : __in WAITORTIMERCALLBACK Callback,
12245 : __in_opt PVOID Parameter,
12246 : __in DWORD DueTime,
12247 : __in DWORD Period,
12248 : __in BOOL PreferIo
12249 : );
12250 :
12251 : WINBASEAPI
12252 : __checkReturn
12253 : BOOL
12254 : WINAPI
12255 : CancelTimerQueueTimer(
12256 : __in_opt HANDLE TimerQueue,
12257 : __in HANDLE Timer
12258 : );
12259 :
12260 : WINBASEAPI
12261 : __checkReturn
12262 : BOOL
12263 : WINAPI
12264 : DeleteTimerQueue(
12265 : __in HANDLE TimerQueue
12266 : );
12267 :
12268 : #if (_WIN32_WINNT >= 0x0600)
12269 :
12270 : typedef VOID (WINAPI *PTP_WIN32_IO_CALLBACK)(
12271 : __inout PTP_CALLBACK_INSTANCE Instance,
12272 : __inout_opt PVOID Context,
12273 : __inout_opt PVOID Overlapped,
12274 : __in ULONG IoResult,
12275 : __in ULONG_PTR NumberOfBytesTransferred,
12276 : __inout PTP_IO Io
12277 : );
12278 :
12279 : WINBASEAPI
12280 : __checkReturn
12281 : __out
12282 : PTP_POOL
12283 : WINAPI
12284 : CreateThreadpool(
12285 : __reserved PVOID reserved
12286 : );
12287 :
12288 : WINBASEAPI
12289 : VOID
12290 : WINAPI
12291 : SetThreadpoolThreadMaximum(
12292 : __inout PTP_POOL ptpp,
12293 : __in DWORD cthrdMost
12294 : );
12295 :
12296 : WINBASEAPI
12297 : BOOL
12298 : WINAPI
12299 : SetThreadpoolThreadMinimum(
12300 : __inout PTP_POOL ptpp,
12301 : __in DWORD cthrdMic
12302 : );
12303 :
12304 : WINBASEAPI
12305 : VOID
12306 : WINAPI
12307 : CloseThreadpool(
12308 : __inout PTP_POOL ptpp
12309 : );
12310 :
12311 : WINBASEAPI
12312 : __checkReturn
12313 : __out
12314 : PTP_CLEANUP_GROUP
12315 : WINAPI
12316 : CreateThreadpoolCleanupGroup(
12317 : VOID
12318 : );
12319 :
12320 : WINBASEAPI
12321 : VOID
12322 : WINAPI
12323 : CloseThreadpoolCleanupGroupMembers(
12324 : __inout PTP_CLEANUP_GROUP ptpcg,
12325 : __in BOOL fCancelPendingCallbacks,
12326 : __inout_opt PVOID pvCleanupContext
12327 : );
12328 :
12329 : WINBASEAPI
12330 : VOID
12331 : WINAPI
12332 : CloseThreadpoolCleanupGroup(
12333 : __inout PTP_CLEANUP_GROUP ptpcg
12334 : );
12335 :
12336 : #if !defined(MIDL_PASS)
12337 :
12338 : FORCEINLINE
12339 : VOID
12340 : InitializeThreadpoolEnvironment(
12341 : __out PTP_CALLBACK_ENVIRON pcbe
12342 : )
12343 : {
12344 : TpInitializeCallbackEnviron(pcbe);
12345 : }
12346 :
12347 : FORCEINLINE
12348 : VOID
12349 : SetThreadpoolCallbackPool(
12350 : __inout PTP_CALLBACK_ENVIRON pcbe,
12351 : __in PTP_POOL ptpp
12352 : )
12353 : {
12354 : TpSetCallbackThreadpool(pcbe, ptpp);
12355 : }
12356 :
12357 : FORCEINLINE
12358 : VOID
12359 : SetThreadpoolCallbackCleanupGroup(
12360 : __inout PTP_CALLBACK_ENVIRON pcbe,
12361 : __in PTP_CLEANUP_GROUP ptpcg,
12362 : __in_opt PTP_CLEANUP_GROUP_CANCEL_CALLBACK pfng
12363 : )
12364 : {
12365 : TpSetCallbackCleanupGroup(pcbe, ptpcg, pfng);
12366 : }
12367 :
12368 : FORCEINLINE
12369 : VOID
12370 : SetThreadpoolCallbackRunsLong(
12371 : __inout PTP_CALLBACK_ENVIRON pcbe
12372 : )
12373 : {
12374 : TpSetCallbackLongFunction(pcbe);
12375 : }
12376 :
12377 : FORCEINLINE
12378 : VOID
12379 : SetThreadpoolCallbackLibrary(
12380 : __inout PTP_CALLBACK_ENVIRON pcbe,
12381 : __in PVOID mod
12382 : )
12383 : {
12384 : TpSetCallbackRaceWithDll(pcbe, mod);
12385 : }
12386 :
12387 : FORCEINLINE
12388 : VOID
12389 : DestroyThreadpoolEnvironment(
12390 : __inout PTP_CALLBACK_ENVIRON pcbe
12391 : )
12392 : {
12393 : TpDestroyCallbackEnviron(pcbe);
12394 : }
12395 :
12396 : #endif // !defined(MIDL_PASS)
12397 :
12398 : WINBASEAPI
12399 : VOID
12400 : WINAPI
12401 : SetEventWhenCallbackReturns(
12402 : __inout PTP_CALLBACK_INSTANCE pci,
12403 : __in HANDLE evt
12404 : );
12405 :
12406 : WINBASEAPI
12407 : VOID
12408 : WINAPI
12409 : ReleaseSemaphoreWhenCallbackReturns(
12410 : __inout PTP_CALLBACK_INSTANCE pci,
12411 : __in HANDLE sem,
12412 : __in DWORD crel
12413 : );
12414 :
12415 : WINBASEAPI
12416 : VOID
12417 : WINAPI
12418 : ReleaseMutexWhenCallbackReturns(
12419 : __inout PTP_CALLBACK_INSTANCE pci,
12420 : __in HANDLE mut
12421 : );
12422 :
12423 : WINBASEAPI
12424 : VOID
12425 : WINAPI
12426 : LeaveCriticalSectionWhenCallbackReturns(
12427 : __inout PTP_CALLBACK_INSTANCE pci,
12428 : __inout PCRITICAL_SECTION pcs
12429 : );
12430 :
12431 : WINBASEAPI
12432 : VOID
12433 : WINAPI
12434 : FreeLibraryWhenCallbackReturns(
12435 : __inout PTP_CALLBACK_INSTANCE pci,
12436 : __in HMODULE mod
12437 : );
12438 :
12439 : WINBASEAPI
12440 : BOOL
12441 : WINAPI
12442 : CallbackMayRunLong(
12443 : __inout PTP_CALLBACK_INSTANCE pci
12444 : );
12445 :
12446 : WINBASEAPI
12447 : VOID
12448 : WINAPI
12449 : DisassociateCurrentThreadFromCallback(
12450 : __inout PTP_CALLBACK_INSTANCE pci
12451 : );
12452 :
12453 : WINBASEAPI
12454 : __checkReturn
12455 : BOOL
12456 : WINAPI
12457 : TrySubmitThreadpoolCallback(
12458 : __in PTP_SIMPLE_CALLBACK pfns,
12459 : __inout_opt PVOID pv,
12460 : __in_opt PTP_CALLBACK_ENVIRON pcbe
12461 : );
12462 :
12463 : WINBASEAPI
12464 : __checkReturn
12465 : __out
12466 : PTP_WORK
12467 : WINAPI
12468 : CreateThreadpoolWork(
12469 : __in PTP_WORK_CALLBACK pfnwk,
12470 : __inout_opt PVOID pv,
12471 : __in_opt PTP_CALLBACK_ENVIRON pcbe
12472 : );
12473 :
12474 : WINBASEAPI
12475 : VOID
12476 : WINAPI
12477 : SubmitThreadpoolWork(
12478 : __inout PTP_WORK pwk
12479 : );
12480 :
12481 : WINBASEAPI
12482 : VOID
12483 : WINAPI
12484 : WaitForThreadpoolWorkCallbacks(
12485 : __inout PTP_WORK pwk,
12486 : __in BOOL fCancelPendingCallbacks
12487 : );
12488 :
12489 : WINBASEAPI
12490 : VOID
12491 : WINAPI
12492 : CloseThreadpoolWork(
12493 : __inout PTP_WORK pwk
12494 : );
12495 :
12496 : WINBASEAPI
12497 : __checkReturn
12498 : __out
12499 : PTP_TIMER
12500 : WINAPI
12501 : CreateThreadpoolTimer(
12502 : __in PTP_TIMER_CALLBACK pfnti,
12503 : __inout_opt PVOID pv,
12504 : __in_opt PTP_CALLBACK_ENVIRON pcbe
12505 : );
12506 :
12507 : WINBASEAPI
12508 : VOID
12509 : WINAPI
12510 : SetThreadpoolTimer(
12511 : __inout PTP_TIMER pti,
12512 : __in_opt PFILETIME pftDueTime,
12513 : __in DWORD msPeriod,
12514 : __in_opt DWORD msWindowLength
12515 : );
12516 :
12517 : WINBASEAPI
12518 : BOOL
12519 : WINAPI
12520 : IsThreadpoolTimerSet(
12521 : __inout PTP_TIMER pti
12522 : );
12523 :
12524 : WINBASEAPI
12525 : VOID
12526 : WINAPI
12527 : WaitForThreadpoolTimerCallbacks(
12528 : __inout PTP_TIMER pti,
12529 : __in BOOL fCancelPendingCallbacks
12530 : );
12531 :
12532 : WINBASEAPI
12533 : VOID
12534 : WINAPI
12535 : CloseThreadpoolTimer(
12536 : __inout PTP_TIMER pti
12537 : );
12538 :
12539 : WINBASEAPI
12540 : __checkReturn
12541 : __out
12542 : PTP_WAIT
12543 : WINAPI
12544 : CreateThreadpoolWait(
12545 : __in PTP_WAIT_CALLBACK pfnwa,
12546 : __inout_opt PVOID pv,
12547 : __in_opt PTP_CALLBACK_ENVIRON pcbe
12548 : );
12549 :
12550 : WINBASEAPI
12551 : VOID
12552 : WINAPI
12553 : SetThreadpoolWait(
12554 : __inout PTP_WAIT pwa,
12555 : __in_opt HANDLE h,
12556 : __in_opt PFILETIME pftTimeout
12557 : );
12558 :
12559 : WINBASEAPI
12560 : VOID
12561 : WINAPI
12562 : WaitForThreadpoolWaitCallbacks(
12563 : __inout PTP_WAIT pwa,
12564 : __in BOOL fCancelPendingCallbacks
12565 : );
12566 :
12567 : WINBASEAPI
12568 : VOID
12569 : WINAPI
12570 : CloseThreadpoolWait(
12571 : __inout PTP_WAIT pwa
12572 : );
12573 :
12574 : WINBASEAPI
12575 : __checkReturn
12576 : __out
12577 : PTP_IO
12578 : WINAPI
12579 : CreateThreadpoolIo(
12580 : __in HANDLE fl,
12581 : __in PTP_WIN32_IO_CALLBACK pfnio,
12582 : __inout_opt PVOID pv,
12583 : __in_opt PTP_CALLBACK_ENVIRON pcbe
12584 : );
12585 :
12586 : WINBASEAPI
12587 : VOID
12588 : WINAPI
12589 : StartThreadpoolIo(
12590 : __inout PTP_IO pio
12591 : );
12592 :
12593 : WINBASEAPI
12594 : VOID
12595 : WINAPI
12596 : CancelThreadpoolIo(
12597 : __inout PTP_IO pio
12598 : );
12599 :
12600 : WINBASEAPI
12601 : VOID
12602 : WINAPI
12603 : WaitForThreadpoolIoCallbacks(
12604 : __inout PTP_IO pio,
12605 : __in BOOL fCancelPendingCallbacks
12606 : );
12607 :
12608 : WINBASEAPI
12609 : VOID
12610 : WINAPI
12611 : CloseThreadpoolIo(
12612 : __inout PTP_IO pio
12613 : );
12614 :
12615 : //
12616 : // Private Namespaces support
12617 : //
12618 :
12619 : WINBASEAPI
12620 : __out_opt
12621 : HANDLE
12622 : WINAPI
12623 : CreatePrivateNamespaceA(
12624 : __in_opt LPSECURITY_ATTRIBUTES lpPrivateNamespaceAttributes,
12625 : __in LPVOID lpBoundaryDescriptor,
12626 : __in LPCSTR lpAliasPrefix
12627 : );
12628 : WINBASEAPI
12629 : __out_opt
12630 : HANDLE
12631 : WINAPI
12632 : CreatePrivateNamespaceW(
12633 : __in_opt LPSECURITY_ATTRIBUTES lpPrivateNamespaceAttributes,
12634 : __in LPVOID lpBoundaryDescriptor,
12635 : __in LPCWSTR lpAliasPrefix
12636 : );
12637 : #ifdef UNICODE
12638 : #define CreatePrivateNamespace CreatePrivateNamespaceW
12639 : #else
12640 : #define CreatePrivateNamespace CreatePrivateNamespaceA
12641 : #endif // !UNICODE
12642 :
12643 : WINBASEAPI
12644 : __out_opt
12645 : HANDLE
12646 : WINAPI
12647 : OpenPrivateNamespaceA(
12648 : __in LPVOID lpBoundaryDescriptor,
12649 : __in LPCSTR lpAliasPrefix
12650 : );
12651 : WINBASEAPI
12652 : __out_opt
12653 : HANDLE
12654 : WINAPI
12655 : OpenPrivateNamespaceW(
12656 : __in LPVOID lpBoundaryDescriptor,
12657 : __in LPCWSTR lpAliasPrefix
12658 : );
12659 : #ifdef UNICODE
12660 : #define OpenPrivateNamespace OpenPrivateNamespaceW
12661 : #else
12662 : #define OpenPrivateNamespace OpenPrivateNamespaceA
12663 : #endif // !UNICODE
12664 :
12665 :
12666 : #define PRIVATE_NAMESPACE_FLAG_DESTROY 0x00000001
12667 :
12668 : WINBASEAPI
12669 : BOOLEAN
12670 : WINAPI
12671 : ClosePrivateNamespace(
12672 : __in HANDLE Handle,
12673 : __in ULONG Flags
12674 : );
12675 :
12676 :
12677 : //
12678 : // Boundary descriptors support
12679 : //
12680 :
12681 : __out_opt
12682 : HANDLE
12683 : APIENTRY
12684 : CreateBoundaryDescriptorA(
12685 : __in LPCSTR Name,
12686 : __in ULONG Flags
12687 : );
12688 : __out_opt
12689 : HANDLE
12690 : APIENTRY
12691 : CreateBoundaryDescriptorW(
12692 : __in LPCWSTR Name,
12693 : __in ULONG Flags
12694 : );
12695 : #ifdef UNICODE
12696 : #define CreateBoundaryDescriptor CreateBoundaryDescriptorW
12697 : #else
12698 : #define CreateBoundaryDescriptor CreateBoundaryDescriptorA
12699 : #endif // !UNICODE
12700 :
12701 : WINBASEAPI
12702 : BOOL
12703 : WINAPI
12704 : AddSIDToBoundaryDescriptor(
12705 : __inout HANDLE * BoundaryDescriptor,
12706 : __in PSID RequiredSid
12707 : );
12708 :
12709 :
12710 : WINBASEAPI
12711 : VOID
12712 : WINAPI
12713 : DeleteBoundaryDescriptor(
12714 : __in HANDLE BoundaryDescriptor
12715 : );
12716 :
12717 :
12718 : #endif // _WIN32_WINNT >= 0x0600
12719 :
12720 : #endif // _WIN32_WINNT >= 0x0500
12721 :
12722 :
12723 : #if(_WIN32_WINNT >= 0x0400)
12724 : //
12725 : // Plug-and-Play API's
12726 : //
12727 :
12728 : #define HW_PROFILE_GUIDLEN 39 // 36-characters plus NULL terminator
12729 : #define MAX_PROFILE_LEN 80
12730 :
12731 : #define DOCKINFO_UNDOCKED (0x1)
12732 : #define DOCKINFO_DOCKED (0x2)
12733 : #define DOCKINFO_USER_SUPPLIED (0x4)
12734 : #define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_UNDOCKED)
12735 : #define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_DOCKED)
12736 :
12737 : typedef struct tagHW_PROFILE_INFOA {
12738 : DWORD dwDockInfo;
12739 : CHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
12740 : CHAR szHwProfileName[MAX_PROFILE_LEN];
12741 : } HW_PROFILE_INFOA, *LPHW_PROFILE_INFOA;
12742 : typedef struct tagHW_PROFILE_INFOW {
12743 : DWORD dwDockInfo;
12744 : WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
12745 : WCHAR szHwProfileName[MAX_PROFILE_LEN];
12746 : } HW_PROFILE_INFOW, *LPHW_PROFILE_INFOW;
12747 : #ifdef UNICODE
12748 : typedef HW_PROFILE_INFOW HW_PROFILE_INFO;
12749 : typedef LPHW_PROFILE_INFOW LPHW_PROFILE_INFO;
12750 : #else
12751 : typedef HW_PROFILE_INFOA HW_PROFILE_INFO;
12752 : typedef LPHW_PROFILE_INFOA LPHW_PROFILE_INFO;
12753 : #endif // UNICODE
12754 :
12755 :
12756 : WINADVAPI
12757 : BOOL
12758 : WINAPI
12759 : GetCurrentHwProfileA (
12760 : __out LPHW_PROFILE_INFOA lpHwProfileInfo
12761 : );
12762 : WINADVAPI
12763 : BOOL
12764 : WINAPI
12765 : GetCurrentHwProfileW (
12766 : __out LPHW_PROFILE_INFOW lpHwProfileInfo
12767 : );
12768 : #ifdef UNICODE
12769 : #define GetCurrentHwProfile GetCurrentHwProfileW
12770 : #else
12771 : #define GetCurrentHwProfile GetCurrentHwProfileA
12772 : #endif // !UNICODE
12773 : #endif /* _WIN32_WINNT >= 0x0400 */
12774 :
12775 : //
12776 : // Performance counter API's
12777 : //
12778 :
12779 : WINBASEAPI
12780 : BOOL
12781 : WINAPI
12782 : QueryPerformanceCounter(
12783 : __out LARGE_INTEGER *lpPerformanceCount
12784 : );
12785 :
12786 : WINBASEAPI
12787 : BOOL
12788 : WINAPI
12789 : QueryPerformanceFrequency(
12790 : __out LARGE_INTEGER *lpFrequency
12791 : );
12792 :
12793 :
12794 :
12795 : WINBASEAPI
12796 : BOOL
12797 : WINAPI
12798 : GetVersionExA(
12799 : __inout LPOSVERSIONINFOA lpVersionInformation
12800 : );
12801 : WINBASEAPI
12802 : BOOL
12803 : WINAPI
12804 : GetVersionExW(
12805 : __inout LPOSVERSIONINFOW lpVersionInformation
12806 : );
12807 : #ifdef UNICODE
12808 : #define GetVersionEx GetVersionExW
12809 : #else
12810 : #define GetVersionEx GetVersionExA
12811 : #endif // !UNICODE
12812 :
12813 :
12814 :
12815 : WINBASEAPI
12816 : BOOL
12817 : WINAPI
12818 : VerifyVersionInfoA(
12819 : __inout LPOSVERSIONINFOEXA lpVersionInformation,
12820 : __in DWORD dwTypeMask,
12821 : __in DWORDLONG dwlConditionMask
12822 : );
12823 : WINBASEAPI
12824 : BOOL
12825 : WINAPI
12826 : VerifyVersionInfoW(
12827 : __inout LPOSVERSIONINFOEXW lpVersionInformation,
12828 : __in DWORD dwTypeMask,
12829 : __in DWORDLONG dwlConditionMask
12830 : );
12831 : #ifdef UNICODE
12832 : #define VerifyVersionInfo VerifyVersionInfoW
12833 : #else
12834 : #define VerifyVersionInfo VerifyVersionInfoA
12835 : #endif // !UNICODE
12836 :
12837 : #if (_WIN32_WINNT >= 0x0600)
12838 :
12839 : WINBASEAPI
12840 : BOOL
12841 : WINAPI
12842 : GetProductInfo(
12843 : __in DWORD dwOSMajorVersion,
12844 : __in DWORD dwOSMinorVersion,
12845 : __in DWORD dwSpMajorVersion,
12846 : __in DWORD dwSpMinorVersion,
12847 : __out PDWORD pdwReturnedProductType
12848 : );
12849 :
12850 : #endif
12851 :
12852 : // DOS and OS/2 Compatible Error Code definitions returned by the Win32 Base
12853 : // API functions.
12854 : //
12855 :
12856 : #include <winerror.h>
12857 :
12858 : /* Abnormal termination codes */
12859 :
12860 : #define TC_NORMAL 0
12861 : #define TC_HARDERR 1
12862 : #define TC_GP_TRAP 2
12863 : #define TC_SIGNAL 3
12864 :
12865 : #if(WINVER >= 0x0400)
12866 : //
12867 : // Power Management APIs
12868 : //
12869 :
12870 : #define AC_LINE_OFFLINE 0x00
12871 : #define AC_LINE_ONLINE 0x01
12872 : #define AC_LINE_BACKUP_POWER 0x02
12873 : #define AC_LINE_UNKNOWN 0xFF
12874 :
12875 : #define BATTERY_FLAG_HIGH 0x01
12876 : #define BATTERY_FLAG_LOW 0x02
12877 : #define BATTERY_FLAG_CRITICAL 0x04
12878 : #define BATTERY_FLAG_CHARGING 0x08
12879 : #define BATTERY_FLAG_NO_BATTERY 0x80
12880 : #define BATTERY_FLAG_UNKNOWN 0xFF
12881 :
12882 : #define BATTERY_PERCENTAGE_UNKNOWN 0xFF
12883 :
12884 : #define BATTERY_LIFE_UNKNOWN 0xFFFFFFFF
12885 :
12886 : typedef struct _SYSTEM_POWER_STATUS {
12887 : BYTE ACLineStatus;
12888 : BYTE BatteryFlag;
12889 : BYTE BatteryLifePercent;
12890 : BYTE Reserved1;
12891 : DWORD BatteryLifeTime;
12892 : DWORD BatteryFullLifeTime;
12893 : } SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS;
12894 :
12895 : BOOL
12896 : WINAPI
12897 : GetSystemPowerStatus(
12898 : __out LPSYSTEM_POWER_STATUS lpSystemPowerStatus
12899 : );
12900 :
12901 : BOOL
12902 : WINAPI
12903 : SetSystemPowerState(
12904 : __in BOOL fSuspend,
12905 : __in BOOL fForce
12906 : );
12907 :
12908 : #endif /* WINVER >= 0x0400 */
12909 :
12910 : #if (_WIN32_WINNT >= 0x0500)
12911 : //
12912 : // Very Large Memory API Subset
12913 : //
12914 :
12915 : WINBASEAPI
12916 : BOOL
12917 : WINAPI
12918 : AllocateUserPhysicalPages(
12919 : __in HANDLE hProcess,
12920 : __inout PULONG_PTR NumberOfPages,
12921 : __out_ecount_part(*NumberOfPages, *NumberOfPages) PULONG_PTR PageArray
12922 : );
12923 :
12924 : #if _WIN32_WINNT >= 0x0600
12925 :
12926 : WINBASEAPI
12927 : BOOL
12928 : WINAPI
12929 : AllocateUserPhysicalPagesNuma(
12930 : __in HANDLE hProcess,
12931 : __inout PULONG_PTR NumberOfPages,
12932 : __out_ecount_part(*NumberOfPages, *NumberOfPages) PULONG_PTR PageArray,
12933 : __in DWORD nndPreferred
12934 : );
12935 :
12936 : #endif // _WIN32_WINNT >= 0x0600
12937 :
12938 : WINBASEAPI
12939 : BOOL
12940 : WINAPI
12941 : FreeUserPhysicalPages(
12942 : __in HANDLE hProcess,
12943 : __inout PULONG_PTR NumberOfPages,
12944 : __in_ecount(*NumberOfPages) PULONG_PTR PageArray
12945 : );
12946 :
12947 : WINBASEAPI
12948 : BOOL
12949 : WINAPI
12950 : MapUserPhysicalPages(
12951 : __in PVOID VirtualAddress,
12952 : __in ULONG_PTR NumberOfPages,
12953 : __in_ecount_opt(NumberOfPages) PULONG_PTR PageArray
12954 : );
12955 :
12956 : WINBASEAPI
12957 : BOOL
12958 : WINAPI
12959 : MapUserPhysicalPagesScatter(
12960 : __in_ecount(NumberOfPages) PVOID *VirtualAddresses,
12961 : __in ULONG_PTR NumberOfPages,
12962 : __in_ecount_opt(NumberOfPages) PULONG_PTR PageArray
12963 : );
12964 :
12965 : WINBASEAPI
12966 : __out_opt
12967 : HANDLE
12968 : WINAPI
12969 : CreateJobObjectA(
12970 : __in_opt LPSECURITY_ATTRIBUTES lpJobAttributes,
12971 : __in_opt LPCSTR lpName
12972 : );
12973 : WINBASEAPI
12974 : __out_opt
12975 : HANDLE
12976 : WINAPI
12977 : CreateJobObjectW(
12978 : __in_opt LPSECURITY_ATTRIBUTES lpJobAttributes,
12979 : __in_opt LPCWSTR lpName
12980 : );
12981 : #ifdef UNICODE
12982 : #define CreateJobObject CreateJobObjectW
12983 : #else
12984 : #define CreateJobObject CreateJobObjectA
12985 : #endif // !UNICODE
12986 :
12987 : WINBASEAPI
12988 : __out_opt
12989 : HANDLE
12990 : WINAPI
12991 : OpenJobObjectA(
12992 : __in DWORD dwDesiredAccess,
12993 : __in BOOL bInheritHandle,
12994 : __in LPCSTR lpName
12995 : );
12996 : WINBASEAPI
12997 : __out_opt
12998 : HANDLE
12999 : WINAPI
13000 : OpenJobObjectW(
13001 : __in DWORD dwDesiredAccess,
13002 : __in BOOL bInheritHandle,
13003 : __in LPCWSTR lpName
13004 : );
13005 : #ifdef UNICODE
13006 : #define OpenJobObject OpenJobObjectW
13007 : #else
13008 : #define OpenJobObject OpenJobObjectA
13009 : #endif // !UNICODE
13010 :
13011 : WINBASEAPI
13012 : BOOL
13013 : WINAPI
13014 : AssignProcessToJobObject(
13015 : __in HANDLE hJob,
13016 : __in HANDLE hProcess
13017 : );
13018 :
13019 : WINBASEAPI
13020 : BOOL
13021 : WINAPI
13022 : TerminateJobObject(
13023 : __in HANDLE hJob,
13024 : __in UINT uExitCode
13025 : );
13026 :
13027 : WINBASEAPI
13028 : BOOL
13029 : WINAPI
13030 : QueryInformationJobObject(
13031 : __in_opt HANDLE hJob,
13032 : __in JOBOBJECTINFOCLASS JobObjectInformationClass,
13033 : __out_bcount_part(cbJobObjectInformationLength, *lpReturnLength) LPVOID lpJobObjectInformation,
13034 : __in DWORD cbJobObjectInformationLength,
13035 : __out_opt LPDWORD lpReturnLength
13036 : );
13037 :
13038 : WINBASEAPI
13039 : BOOL
13040 : WINAPI
13041 : SetInformationJobObject(
13042 : __in HANDLE hJob,
13043 : __in JOBOBJECTINFOCLASS JobObjectInformationClass,
13044 : __in_bcount(cbJobObjectInformationLength) LPVOID lpJobObjectInformation,
13045 : __in DWORD cbJobObjectInformationLength
13046 : );
13047 :
13048 : #if (_WIN32_WINNT >= 0x0501)
13049 :
13050 : WINBASEAPI
13051 : BOOL
13052 : WINAPI
13053 : IsProcessInJob (
13054 : __in HANDLE ProcessHandle,
13055 : __in_opt HANDLE JobHandle,
13056 : __out PBOOL Result
13057 : );
13058 :
13059 : #endif
13060 :
13061 : WINBASEAPI
13062 : BOOL
13063 : WINAPI
13064 : CreateJobSet (
13065 : __in ULONG NumJob,
13066 : __in_ecount(NumJob) PJOB_SET_ARRAY UserJobSet,
13067 : __in ULONG Flags);
13068 :
13069 : WINBASEAPI
13070 : __out_opt
13071 : PVOID
13072 : WINAPI
13073 : AddVectoredExceptionHandler (
13074 : __in ULONG First,
13075 : __in PVECTORED_EXCEPTION_HANDLER Handler
13076 : );
13077 :
13078 : WINBASEAPI
13079 : ULONG
13080 : WINAPI
13081 : RemoveVectoredExceptionHandler (
13082 : __in PVOID Handle
13083 : );
13084 :
13085 : WINBASEAPI
13086 : __out_opt
13087 : PVOID
13088 : WINAPI
13089 : AddVectoredContinueHandler (
13090 : __in ULONG First,
13091 : __in PVECTORED_EXCEPTION_HANDLER Handler
13092 : );
13093 :
13094 : WINBASEAPI
13095 : ULONG
13096 : WINAPI
13097 : RemoveVectoredContinueHandler (
13098 : __in PVOID Handle
13099 : );
13100 :
13101 : //
13102 : // New Volume Mount Point API.
13103 : //
13104 :
13105 : WINBASEAPI
13106 : __out
13107 : HANDLE
13108 : WINAPI
13109 : FindFirstVolumeA(
13110 : __out_ecount(cchBufferLength) LPSTR lpszVolumeName,
13111 : __in DWORD cchBufferLength
13112 : );
13113 : WINBASEAPI
13114 : __out
13115 : HANDLE
13116 : WINAPI
13117 : FindFirstVolumeW(
13118 : __out_ecount(cchBufferLength) LPWSTR lpszVolumeName,
13119 : __in DWORD cchBufferLength
13120 : );
13121 : #ifdef UNICODE
13122 : #define FindFirstVolume FindFirstVolumeW
13123 : #else
13124 : #define FindFirstVolume FindFirstVolumeA
13125 : #endif // !UNICODE
13126 :
13127 : WINBASEAPI
13128 : BOOL
13129 : WINAPI
13130 : FindNextVolumeA(
13131 : __inout HANDLE hFindVolume,
13132 : __out_ecount(cchBufferLength) LPSTR lpszVolumeName,
13133 : __in DWORD cchBufferLength
13134 : );
13135 : WINBASEAPI
13136 : BOOL
13137 : WINAPI
13138 : FindNextVolumeW(
13139 : __inout HANDLE hFindVolume,
13140 : __out_ecount(cchBufferLength) LPWSTR lpszVolumeName,
13141 : __in DWORD cchBufferLength
13142 : );
13143 : #ifdef UNICODE
13144 : #define FindNextVolume FindNextVolumeW
13145 : #else
13146 : #define FindNextVolume FindNextVolumeA
13147 : #endif // !UNICODE
13148 :
13149 : WINBASEAPI
13150 : BOOL
13151 : WINAPI
13152 : FindVolumeClose(
13153 : __in HANDLE hFindVolume
13154 : );
13155 :
13156 : WINBASEAPI
13157 : __out
13158 : HANDLE
13159 : WINAPI
13160 : FindFirstVolumeMountPointA(
13161 : __in LPCSTR lpszRootPathName,
13162 : __out_ecount(cchBufferLength) LPSTR lpszVolumeMountPoint,
13163 : __in DWORD cchBufferLength
13164 : );
13165 : WINBASEAPI
13166 : __out
13167 : HANDLE
13168 : WINAPI
13169 : FindFirstVolumeMountPointW(
13170 : __in LPCWSTR lpszRootPathName,
13171 : __out_ecount(cchBufferLength) LPWSTR lpszVolumeMountPoint,
13172 : __in DWORD cchBufferLength
13173 : );
13174 : #ifdef UNICODE
13175 : #define FindFirstVolumeMountPoint FindFirstVolumeMountPointW
13176 : #else
13177 : #define FindFirstVolumeMountPoint FindFirstVolumeMountPointA
13178 : #endif // !UNICODE
13179 :
13180 : WINBASEAPI
13181 : BOOL
13182 : WINAPI
13183 : FindNextVolumeMountPointA(
13184 : __in HANDLE hFindVolumeMountPoint,
13185 : __out_ecount(cchBufferLength) LPSTR lpszVolumeMountPoint,
13186 : __in DWORD cchBufferLength
13187 : );
13188 : WINBASEAPI
13189 : BOOL
13190 : WINAPI
13191 : FindNextVolumeMountPointW(
13192 : __in HANDLE hFindVolumeMountPoint,
13193 : __out_ecount(cchBufferLength) LPWSTR lpszVolumeMountPoint,
13194 : __in DWORD cchBufferLength
13195 : );
13196 : #ifdef UNICODE
13197 : #define FindNextVolumeMountPoint FindNextVolumeMountPointW
13198 : #else
13199 : #define FindNextVolumeMountPoint FindNextVolumeMountPointA
13200 : #endif // !UNICODE
13201 :
13202 : WINBASEAPI
13203 : BOOL
13204 : WINAPI
13205 : FindVolumeMountPointClose(
13206 : __in HANDLE hFindVolumeMountPoint
13207 : );
13208 :
13209 : WINBASEAPI
13210 : BOOL
13211 : WINAPI
13212 : SetVolumeMountPointA(
13213 : __in LPCSTR lpszVolumeMountPoint,
13214 : __in LPCSTR lpszVolumeName
13215 : );
13216 : WINBASEAPI
13217 : BOOL
13218 : WINAPI
13219 : SetVolumeMountPointW(
13220 : __in LPCWSTR lpszVolumeMountPoint,
13221 : __in LPCWSTR lpszVolumeName
13222 : );
13223 : #ifdef UNICODE
13224 : #define SetVolumeMountPoint SetVolumeMountPointW
13225 : #else
13226 : #define SetVolumeMountPoint SetVolumeMountPointA
13227 : #endif // !UNICODE
13228 :
13229 : WINBASEAPI
13230 : BOOL
13231 : WINAPI
13232 : DeleteVolumeMountPointA(
13233 : __in LPCSTR lpszVolumeMountPoint
13234 : );
13235 : WINBASEAPI
13236 : BOOL
13237 : WINAPI
13238 : DeleteVolumeMountPointW(
13239 : __in LPCWSTR lpszVolumeMountPoint
13240 : );
13241 : #ifdef UNICODE
13242 : #define DeleteVolumeMountPoint DeleteVolumeMountPointW
13243 : #else
13244 : #define DeleteVolumeMountPoint DeleteVolumeMountPointA
13245 : #endif // !UNICODE
13246 :
13247 : WINBASEAPI
13248 : BOOL
13249 : WINAPI
13250 : GetVolumeNameForVolumeMountPointA(
13251 : __in LPCSTR lpszVolumeMountPoint,
13252 : __out_ecount(cchBufferLength) LPSTR lpszVolumeName,
13253 : __in DWORD cchBufferLength
13254 : );
13255 : WINBASEAPI
13256 : BOOL
13257 : WINAPI
13258 : GetVolumeNameForVolumeMountPointW(
13259 : __in LPCWSTR lpszVolumeMountPoint,
13260 : __out_ecount(cchBufferLength) LPWSTR lpszVolumeName,
13261 : __in DWORD cchBufferLength
13262 : );
13263 : #ifdef UNICODE
13264 : #define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointW
13265 : #else
13266 : #define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointA
13267 : #endif // !UNICODE
13268 :
13269 : WINBASEAPI
13270 : BOOL
13271 : WINAPI
13272 : GetVolumePathNameA(
13273 : __in LPCSTR lpszFileName,
13274 : __out_ecount(cchBufferLength) LPSTR lpszVolumePathName,
13275 : __in DWORD cchBufferLength
13276 : );
13277 : WINBASEAPI
13278 : BOOL
13279 : WINAPI
13280 : GetVolumePathNameW(
13281 : __in LPCWSTR lpszFileName,
13282 : __out_ecount(cchBufferLength) LPWSTR lpszVolumePathName,
13283 : __in DWORD cchBufferLength
13284 : );
13285 : #ifdef UNICODE
13286 : #define GetVolumePathName GetVolumePathNameW
13287 : #else
13288 : #define GetVolumePathName GetVolumePathNameA
13289 : #endif // !UNICODE
13290 :
13291 : WINBASEAPI
13292 : BOOL
13293 : WINAPI
13294 : GetVolumePathNamesForVolumeNameA(
13295 : __in LPCSTR lpszVolumeName,
13296 : __out_ecount_part_opt(cchBufferLength, *lpcchReturnLength) __nullnullterminated LPCH lpszVolumePathNames,
13297 : __in DWORD cchBufferLength,
13298 : __out PDWORD lpcchReturnLength
13299 : );
13300 : WINBASEAPI
13301 : BOOL
13302 : WINAPI
13303 : GetVolumePathNamesForVolumeNameW(
13304 : __in LPCWSTR lpszVolumeName,
13305 : __out_ecount_part_opt(cchBufferLength, *lpcchReturnLength) __nullnullterminated LPWCH lpszVolumePathNames,
13306 : __in DWORD cchBufferLength,
13307 : __out PDWORD lpcchReturnLength
13308 : );
13309 : #ifdef UNICODE
13310 : #define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameW
13311 : #else
13312 : #define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameA
13313 : #endif // !UNICODE
13314 :
13315 : #endif
13316 :
13317 : #if (_WIN32_WINNT >= 0x0500) || (_WIN32_FUSION >= 0x0100) || ISOLATION_AWARE_ENABLED
13318 :
13319 : #define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID (0x00000001)
13320 : #define ACTCTX_FLAG_LANGID_VALID (0x00000002)
13321 : #define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID (0x00000004)
13322 : #define ACTCTX_FLAG_RESOURCE_NAME_VALID (0x00000008)
13323 : #define ACTCTX_FLAG_SET_PROCESS_DEFAULT (0x00000010)
13324 : #define ACTCTX_FLAG_APPLICATION_NAME_VALID (0x00000020)
13325 : #define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF (0x00000040)
13326 : #define ACTCTX_FLAG_HMODULE_VALID (0x00000080)
13327 :
13328 : typedef struct tagACTCTXA {
13329 : ULONG cbSize;
13330 : DWORD dwFlags;
13331 : LPCSTR lpSource;
13332 : USHORT wProcessorArchitecture;
13333 : LANGID wLangId;
13334 : LPCSTR lpAssemblyDirectory;
13335 : LPCSTR lpResourceName;
13336 : LPCSTR lpApplicationName;
13337 : HMODULE hModule;
13338 : } ACTCTXA, *PACTCTXA;
13339 : typedef struct tagACTCTXW {
13340 : ULONG cbSize;
13341 : DWORD dwFlags;
13342 : LPCWSTR lpSource;
13343 : USHORT wProcessorArchitecture;
13344 : LANGID wLangId;
13345 : LPCWSTR lpAssemblyDirectory;
13346 : LPCWSTR lpResourceName;
13347 : LPCWSTR lpApplicationName;
13348 : HMODULE hModule;
13349 : } ACTCTXW, *PACTCTXW;
13350 : #ifdef UNICODE
13351 : typedef ACTCTXW ACTCTX;
13352 : typedef PACTCTXW PACTCTX;
13353 : #else
13354 : typedef ACTCTXA ACTCTX;
13355 : typedef PACTCTXA PACTCTX;
13356 : #endif // UNICODE
13357 :
13358 : typedef const ACTCTXA *PCACTCTXA;
13359 : typedef const ACTCTXW *PCACTCTXW;
13360 : #ifdef UNICODE
13361 : typedef PCACTCTXW PCACTCTX;
13362 : #else
13363 : typedef PCACTCTXA PCACTCTX;
13364 : #endif // UNICODE
13365 :
13366 :
13367 :
13368 : WINBASEAPI
13369 : __out
13370 : HANDLE
13371 : WINAPI
13372 : CreateActCtxA(
13373 : __in PCACTCTXA pActCtx
13374 : );
13375 : WINBASEAPI
13376 : __out
13377 : HANDLE
13378 : WINAPI
13379 : CreateActCtxW(
13380 : __in PCACTCTXW pActCtx
13381 : );
13382 : #ifdef UNICODE
13383 : #define CreateActCtx CreateActCtxW
13384 : #else
13385 : #define CreateActCtx CreateActCtxA
13386 : #endif // !UNICODE
13387 :
13388 : WINBASEAPI
13389 : VOID
13390 : WINAPI
13391 : AddRefActCtx(
13392 : __inout HANDLE hActCtx
13393 : );
13394 :
13395 :
13396 : WINBASEAPI
13397 : VOID
13398 : WINAPI
13399 : ReleaseActCtx(
13400 : __inout HANDLE hActCtx
13401 : );
13402 :
13403 : WINBASEAPI
13404 : BOOL
13405 : WINAPI
13406 : ZombifyActCtx(
13407 : __inout HANDLE hActCtx
13408 : );
13409 :
13410 :
13411 : WINBASEAPI
13412 : BOOL
13413 : WINAPI
13414 : ActivateActCtx(
13415 : __inout_opt HANDLE hActCtx,
13416 : __out ULONG_PTR *lpCookie
13417 : );
13418 :
13419 :
13420 : #define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION (0x00000001)
13421 :
13422 : WINBASEAPI
13423 : BOOL
13424 : WINAPI
13425 : DeactivateActCtx(
13426 : __in DWORD dwFlags,
13427 : __in ULONG_PTR ulCookie
13428 : );
13429 :
13430 : WINBASEAPI
13431 : BOOL
13432 : WINAPI
13433 : GetCurrentActCtx(
13434 : __deref_out HANDLE *lphActCtx);
13435 :
13436 :
13437 : typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 {
13438 : ULONG cbSize;
13439 : ULONG ulDataFormatVersion;
13440 : PVOID lpData;
13441 : ULONG ulLength;
13442 : PVOID lpSectionGlobalData;
13443 : ULONG ulSectionGlobalDataLength;
13444 : PVOID lpSectionBase;
13445 : ULONG ulSectionTotalLength;
13446 : HANDLE hActCtx;
13447 : ULONG ulAssemblyRosterIndex;
13448 : } ACTCTX_SECTION_KEYED_DATA_2600, *PACTCTX_SECTION_KEYED_DATA_2600;
13449 : typedef const ACTCTX_SECTION_KEYED_DATA_2600 * PCACTCTX_SECTION_KEYED_DATA_2600;
13450 :
13451 : typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {
13452 : PVOID lpInformation;
13453 : PVOID lpSectionBase;
13454 : ULONG ulSectionLength;
13455 : PVOID lpSectionGlobalDataBase;
13456 : ULONG ulSectionGlobalDataLength;
13457 : } ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, *PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
13458 : typedef const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA *PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
13459 :
13460 : typedef struct tagACTCTX_SECTION_KEYED_DATA {
13461 : ULONG cbSize;
13462 : ULONG ulDataFormatVersion;
13463 : PVOID lpData;
13464 : ULONG ulLength;
13465 : PVOID lpSectionGlobalData;
13466 : ULONG ulSectionGlobalDataLength;
13467 : PVOID lpSectionBase;
13468 : ULONG ulSectionTotalLength;
13469 : HANDLE hActCtx;
13470 : ULONG ulAssemblyRosterIndex;
13471 : // 2600 stops here
13472 : ULONG ulFlags;
13473 : ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata;
13474 : } ACTCTX_SECTION_KEYED_DATA, *PACTCTX_SECTION_KEYED_DATA;
13475 : typedef const ACTCTX_SECTION_KEYED_DATA * PCACTCTX_SECTION_KEYED_DATA;
13476 :
13477 : #define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX (0x00000001)
13478 : #define FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS (0x00000002)
13479 : #define FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA (0x00000004)
13480 :
13481 :
13482 :
13483 : WINBASEAPI
13484 : BOOL
13485 : WINAPI
13486 : FindActCtxSectionStringA(
13487 : __in DWORD dwFlags,
13488 : __reserved const GUID *lpExtensionGuid,
13489 : __in ULONG ulSectionId,
13490 : __in LPCSTR lpStringToFind,
13491 : __out PACTCTX_SECTION_KEYED_DATA ReturnedData
13492 : );
13493 : WINBASEAPI
13494 : BOOL
13495 : WINAPI
13496 : FindActCtxSectionStringW(
13497 : __in DWORD dwFlags,
13498 : __reserved const GUID *lpExtensionGuid,
13499 : __in ULONG ulSectionId,
13500 : __in LPCWSTR lpStringToFind,
13501 : __out PACTCTX_SECTION_KEYED_DATA ReturnedData
13502 : );
13503 : #ifdef UNICODE
13504 : #define FindActCtxSectionString FindActCtxSectionStringW
13505 : #else
13506 : #define FindActCtxSectionString FindActCtxSectionStringA
13507 : #endif // !UNICODE
13508 :
13509 : WINBASEAPI
13510 : BOOL
13511 : WINAPI
13512 : FindActCtxSectionGuid(
13513 : __in DWORD dwFlags,
13514 : __reserved const GUID *lpExtensionGuid,
13515 : __in ULONG ulSectionId,
13516 : __in_opt const GUID *lpGuidToFind,
13517 : __out PACTCTX_SECTION_KEYED_DATA ReturnedData
13518 : );
13519 :
13520 :
13521 : #if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
13522 : #if !defined(ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED)
13523 :
13524 : typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION {
13525 : HANDLE hActCtx;
13526 : DWORD dwFlags;
13527 : } ACTIVATION_CONTEXT_BASIC_INFORMATION, *PACTIVATION_CONTEXT_BASIC_INFORMATION;
13528 :
13529 : typedef const struct _ACTIVATION_CONTEXT_BASIC_INFORMATION *PCACTIVATION_CONTEXT_BASIC_INFORMATION;
13530 :
13531 : #define ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED 1
13532 :
13533 : #endif // !defined(ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED)
13534 : #endif
13535 :
13536 : #define QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX (0x00000004)
13537 : #define QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE (0x00000008)
13538 : #define QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS (0x00000010)
13539 : #define QUERY_ACTCTX_FLAG_NO_ADDREF (0x80000000)
13540 :
13541 :
13542 :
13543 : //
13544 : // switch (ulInfoClass)
13545 : //
13546 : // case ActivationContextBasicInformation:
13547 : // pvSubInstance == NULL
13548 : // pvBuffer is of type PACTIVATION_CONTEXT_BASIC_INFORMATION
13549 : //
13550 : // case ActivationContextDetailedInformation:
13551 : // pvSubInstance == NULL
13552 : // pvBuffer is of type PACTIVATION_CONTEXT_DETAILED_INFORMATION
13553 : //
13554 : // case AssemblyDetailedInformationInActivationContext:
13555 : // pvSubInstance is of type PULONG
13556 : // *pvSubInstance < ACTIVATION_CONTEXT_DETAILED_INFORMATION::ulAssemblyCount
13557 : // pvBuffer is of type PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION
13558 : //
13559 : // case FileInformationInAssemblyOfAssemblyInActivationContext:
13560 : // pvSubInstance is of type PACTIVATION_CONTEXT_QUERY_INDEX
13561 : // pvSubInstance->ulAssemblyIndex < ACTIVATION_CONTEXT_DETAILED_INFORMATION::ulAssemblyCount
13562 : // pvSubInstance->ulFileIndexInAssembly < ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION::ulFileCount
13563 : // pvBuffer is of type PASSEMBLY_FILE_DETAILED_INFORMATION
13564 : //
13565 : // case RunlevelInformationInActivationContext :
13566 : // pvSubInstance == NULL
13567 : // pvBuffer is of type PACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION
13568 : //
13569 : // String are placed after the structs.
13570 : //
13571 : WINBASEAPI
13572 : BOOL
13573 : WINAPI
13574 : QueryActCtxW(
13575 : __in DWORD dwFlags,
13576 : __in HANDLE hActCtx,
13577 : __in_opt PVOID pvSubInstance,
13578 : __in ULONG ulInfoClass,
13579 : __out_bcount_part_opt(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
13580 : __in SIZE_T cbBuffer,
13581 : __out_opt SIZE_T *pcbWrittenOrRequired
13582 : );
13583 :
13584 : typedef BOOL (WINAPI * PQUERYACTCTXW_FUNC)(
13585 : __in DWORD dwFlags,
13586 : __in HANDLE hActCtx,
13587 : __in_opt PVOID pvSubInstance,
13588 : __in ULONG ulInfoClass,
13589 : __out_bcount_part_opt(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
13590 : __in SIZE_T cbBuffer,
13591 : __out_opt SIZE_T *pcbWrittenOrRequired
13592 : );
13593 :
13594 : #endif // (_WIN32_WINNT > 0x0500) || (_WIN32_FUSION >= 0x0100) || ISOLATION_AWARE_ENABLED
13595 :
13596 :
13597 : WINBASEAPI
13598 : BOOL
13599 : WINAPI
13600 : ProcessIdToSessionId(
13601 : __in DWORD dwProcessId,
13602 : __out DWORD *pSessionId
13603 : );
13604 :
13605 : #if _WIN32_WINNT >= 0x0501
13606 :
13607 : WINBASEAPI
13608 : DWORD
13609 : WINAPI
13610 : WTSGetActiveConsoleSessionId(
13611 : VOID
13612 : );
13613 :
13614 : WINBASEAPI
13615 : BOOL
13616 : WINAPI
13617 : IsWow64Process(
13618 : __in HANDLE hProcess,
13619 : __out PBOOL Wow64Process
13620 : );
13621 :
13622 : #endif // (_WIN32_WINNT >= 0x0501)
13623 :
13624 : WINBASEAPI
13625 : BOOL
13626 : WINAPI
13627 : GetLogicalProcessorInformation(
13628 : __out_bcount_part(*ReturnedLength, *ReturnedLength) PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer,
13629 : __inout PDWORD ReturnedLength
13630 : );
13631 :
13632 : //
13633 : // NUMA Information routines.
13634 : //
13635 :
13636 : WINBASEAPI
13637 : BOOL
13638 : WINAPI
13639 : GetNumaHighestNodeNumber(
13640 : __out PULONG HighestNodeNumber
13641 : );
13642 :
13643 : WINBASEAPI
13644 : BOOL
13645 : WINAPI
13646 : GetNumaProcessorNode(
13647 : __in UCHAR Processor,
13648 : __out PUCHAR NodeNumber
13649 : );
13650 :
13651 : WINBASEAPI
13652 : BOOL
13653 : WINAPI
13654 : GetNumaNodeProcessorMask(
13655 : __in UCHAR Node,
13656 : __out PULONGLONG ProcessorMask
13657 : );
13658 :
13659 : WINBASEAPI
13660 : BOOL
13661 : WINAPI
13662 : GetNumaAvailableMemoryNode(
13663 : __in UCHAR Node,
13664 : __out PULONGLONG AvailableBytes
13665 : );
13666 :
13667 : #if (_WIN32_WINNT >= 0x0600)
13668 :
13669 : WINBASEAPI
13670 : BOOL
13671 : WINAPI
13672 : GetNumaProximityNode(
13673 : __in ULONG ProximityId,
13674 : __out PUCHAR NodeNumber
13675 : );
13676 :
13677 : #endif
13678 :
13679 : //
13680 : // Application restart and data recovery callback
13681 : //
13682 : typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID pvParameter);
13683 :
13684 : //
13685 : // Max length of commandline in characters (including the NULL character that can be registered for restart)
13686 : //
13687 : #define RESTART_MAX_CMD_LINE 2048
13688 :
13689 :
13690 : //
13691 : // Do not restart the process for termination due to application crashes
13692 : //
13693 : #define RESTART_NO_CRASH 1
13694 :
13695 : //
13696 : // Do not restart the process for termination due to application hangs
13697 : //
13698 : #define RESTART_NO_HANG 2
13699 :
13700 : //
13701 : // Do not restart the process for termination due to patch installations
13702 : //
13703 : #define RESTART_NO_PATCH 4
13704 :
13705 : //
13706 : // Do not restart the process when the system is rebooted because the
13707 : //
13708 : #define RESTART_NO_REBOOT 8
13709 :
13710 : WINBASEAPI
13711 : HRESULT
13712 : WINAPI
13713 : RegisterApplicationRecoveryCallback(
13714 : __in APPLICATION_RECOVERY_CALLBACK pRecoveyCallback,
13715 : __in_opt PVOID pvParameter,
13716 : __in DWORD dwPingInterval,
13717 : __in DWORD dwFlags
13718 : );
13719 :
13720 : WINBASEAPI
13721 : HRESULT
13722 : WINAPI
13723 : UnregisterApplicationRecoveryCallback();
13724 :
13725 : WINBASEAPI
13726 : HRESULT
13727 : WINAPI
13728 : RegisterApplicationRestart(
13729 : __in_opt PCWSTR pwzCommandline,
13730 : __in DWORD dwFlags
13731 : );
13732 :
13733 : WINBASEAPI
13734 : HRESULT
13735 : WINAPI
13736 : UnregisterApplicationRestart();
13737 :
13738 :
13739 : #define RECOVERY_DEFAULT_PING_INTERVAL 5000
13740 : #define RECOVERY_MAX_PING_INTERVAL (5 * 60 * 1000)
13741 :
13742 : WINBASEAPI
13743 : HRESULT
13744 : WINAPI
13745 : GetApplicationRecoveryCallback(
13746 : __in HANDLE hProcess,
13747 : __out APPLICATION_RECOVERY_CALLBACK* pRecoveryCallback,
13748 : __deref_opt_out_opt PVOID* ppvParameter,
13749 : __out_opt PDWORD pdwPingInterval,
13750 : __out_opt PDWORD pdwFlags
13751 : );
13752 :
13753 : WINBASEAPI
13754 : HRESULT
13755 : WINAPI
13756 : GetApplicationRestartSettings(
13757 : __in HANDLE hProcess,
13758 : __out_ecount_opt(*pcchSize) PWSTR pwzCommandline,
13759 : __inout PDWORD pcchSize,
13760 : __out_opt PDWORD pdwFlags
13761 : );
13762 :
13763 : WINBASEAPI
13764 : HRESULT
13765 : WINAPI
13766 : ApplicationRecoveryInProgress(
13767 : __out PBOOL pbCancelled
13768 : );
13769 :
13770 : WINBASEAPI
13771 : VOID
13772 : WINAPI
13773 : ApplicationRecoveryFinished(
13774 : __in BOOL bSuccess
13775 : );
13776 :
13777 : #if (_WIN32_WINNT >= 0x0600)
13778 : typedef enum _FILE_INFO_BY_HANDLE_CLASS {
13779 : FileBasicInfo,
13780 : FileStandardInfo,
13781 : FileNameInfo,
13782 : FileRenameInfo,
13783 : FileDispositionInfo,
13784 : FileAllocationInfo,
13785 : FileEndOfFileInfo,
13786 : FileStreamInfo,
13787 : FileCompressionInfo,
13788 : FileAttributeTagInfo,
13789 : FileIdBothDirectoryInfo,
13790 : FileIdBothDirectoryRestartInfo,
13791 : FileIoPriorityHintInfo,
13792 : MaximumFileInfoByHandleClass
13793 : } FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;
13794 :
13795 : typedef struct _FILE_BASIC_INFO {
13796 : LARGE_INTEGER CreationTime;
13797 : LARGE_INTEGER LastAccessTime;
13798 : LARGE_INTEGER LastWriteTime;
13799 : LARGE_INTEGER ChangeTime;
13800 : DWORD FileAttributes;
13801 : } FILE_BASIC_INFO, *PFILE_BASIC_INFO;
13802 :
13803 : typedef struct _FILE_STANDARD_INFO {
13804 : LARGE_INTEGER AllocationSize;
13805 : LARGE_INTEGER EndOfFile;
13806 : DWORD NumberOfLinks;
13807 : BOOLEAN DeletePending;
13808 : BOOLEAN Directory;
13809 : } FILE_STANDARD_INFO, *PFILE_STANDARD_INFO;
13810 :
13811 : typedef struct _FILE_NAME_INFO {
13812 : DWORD FileNameLength;
13813 : WCHAR FileName[1];
13814 : } FILE_NAME_INFO, *PFILE_NAME_INFO;
13815 :
13816 : typedef struct _FILE_RENAME_INFO {
13817 : BOOLEAN ReplaceIfExists;
13818 : HANDLE RootDirectory;
13819 : DWORD FileNameLength;
13820 : WCHAR FileName[1];
13821 : } FILE_RENAME_INFO, *PFILE_RENAME_INFO;
13822 :
13823 : typedef struct _FILE_ALLOCATION_INFO {
13824 : LARGE_INTEGER AllocationSize;
13825 : } FILE_ALLOCATION_INFO, *PFILE_ALLOCATION_INFO;
13826 :
13827 : typedef struct _FILE_END_OF_FILE_INFO {
13828 : LARGE_INTEGER EndOfFile;
13829 : } FILE_END_OF_FILE_INFO, *PFILE_END_OF_FILE_INFO;
13830 :
13831 : typedef struct _FILE_STREAM_INFO {
13832 : DWORD NextEntryOffset;
13833 : DWORD StreamNameLength;
13834 : LARGE_INTEGER StreamSize;
13835 : LARGE_INTEGER StreamAllocationSize;
13836 : WCHAR StreamName[1];
13837 : } FILE_STREAM_INFO, *PFILE_STREAM_INFO;
13838 :
13839 : typedef struct _FILE_COMPRESSION_INFO {
13840 : LARGE_INTEGER CompressedFileSize;
13841 : WORD CompressionFormat;
13842 : UCHAR CompressionUnitShift;
13843 : UCHAR ChunkShift;
13844 : UCHAR ClusterShift;
13845 : UCHAR Reserved[3];
13846 : } FILE_COMPRESSION_INFO, *PFILE_COMPRESSION_INFO;
13847 :
13848 : typedef struct _FILE_ATTRIBUTE_TAG_INFO {
13849 : DWORD FileAttributes;
13850 : DWORD ReparseTag;
13851 : } FILE_ATTRIBUTE_TAG_INFO, *PFILE_ATTRIBUTE_TAG_INFO;
13852 :
13853 : typedef struct _FILE_DISPOSITION_INFO {
13854 : BOOLEAN DeleteFile;
13855 : } FILE_DISPOSITION_INFO, *PFILE_DISPOSITION_INFO;
13856 :
13857 : typedef struct _FILE_ID_BOTH_DIR_INFO {
13858 : DWORD NextEntryOffset;
13859 : DWORD FileIndex;
13860 : LARGE_INTEGER CreationTime;
13861 : LARGE_INTEGER LastAccessTime;
13862 : LARGE_INTEGER LastWriteTime;
13863 : LARGE_INTEGER ChangeTime;
13864 : LARGE_INTEGER EndOfFile;
13865 : LARGE_INTEGER AllocationSize;
13866 : DWORD FileAttributes;
13867 : DWORD FileNameLength;
13868 : DWORD EaSize;
13869 : CCHAR ShortNameLength;
13870 : WCHAR ShortName[12];
13871 : LARGE_INTEGER FileId;
13872 : WCHAR FileName[1];
13873 : } FILE_ID_BOTH_DIR_INFO, *PFILE_ID_BOTH_DIR_INFO;
13874 :
13875 : typedef enum _PRIORITY_HINT {
13876 : IoPriorityHintVeryLow = 0,
13877 : IoPriorityHintLow,
13878 : IoPriorityHintNormal,
13879 : MaximumIoPriorityHintType
13880 : } PRIORITY_HINT;
13881 :
13882 : typedef struct _FILE_IO_PRIORITY_HINT_INFO {
13883 : PRIORITY_HINT PriorityHint;
13884 : } FILE_IO_PRIORITY_HINT_INFO, *PFILE_IO_PRIORITY_HINT_INFO;
13885 :
13886 : BOOL
13887 : WINAPI
13888 : SetFileInformationByHandle(
13889 : __in HANDLE hFile,
13890 : __in FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
13891 : __in_bcount(dwBufferSize) LPVOID lpFileInformation,
13892 : __in DWORD dwBufferSize
13893 : );
13894 :
13895 : BOOL
13896 : WINAPI
13897 : GetFileInformationByHandleEx(
13898 : __in HANDLE hFile,
13899 : __in FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
13900 : __out_bcount(dwBufferSize) LPVOID lpFileInformation,
13901 : __in DWORD dwBufferSize
13902 : );
13903 :
13904 : typedef enum _FILE_ID_TYPE {
13905 : FileIdType,
13906 : ObjectIdType,
13907 : MaximumFileIdType
13908 : } FILE_ID_TYPE, *PFILE_ID_TYPE;
13909 :
13910 : typedef struct FILE_ID_DESCRIPTOR {
13911 : DWORD dwSize; // Size of the struct
13912 : FILE_ID_TYPE Type; // Describes the type of identifier passed in.
13913 : union {
13914 : LARGE_INTEGER FileId;
13915 : GUID ObjectId;
13916 : };
13917 : } FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR;
13918 :
13919 : __out
13920 : HANDLE
13921 : WINAPI
13922 : OpenFileById (
13923 : __in HANDLE hVolumeHint,
13924 : __in LPFILE_ID_DESCRIPTOR lpFileId,
13925 : __in DWORD dwDesiredAccess,
13926 : __in DWORD dwShareMode,
13927 : __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
13928 : __in DWORD dwFlagsAndAttributes
13929 : );
13930 : #endif
13931 :
13932 : #if (_WIN32_WINNT >= 0x0600)
13933 :
13934 : //
13935 : // Flags to be passed into CREATE_SYMBOLIC_LINK
13936 : //
13937 :
13938 : #define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1)
13939 :
13940 : #define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever other flags we think of!
13941 :
13942 : BOOLEAN
13943 : APIENTRY
13944 : CreateSymbolicLinkA (
13945 : __in LPCSTR lpSymlinkFileName,
13946 : __in LPCSTR lpTargetFileName,
13947 : __in DWORD dwFlags
13948 : );
13949 : BOOLEAN
13950 : APIENTRY
13951 : CreateSymbolicLinkW (
13952 : __in LPCWSTR lpSymlinkFileName,
13953 : __in LPCWSTR lpTargetFileName,
13954 : __in DWORD dwFlags
13955 : );
13956 : #ifdef UNICODE
13957 : #define CreateSymbolicLink CreateSymbolicLinkW
13958 : #else
13959 : #define CreateSymbolicLink CreateSymbolicLinkA
13960 : #endif // !UNICODE
13961 :
13962 : BOOLEAN
13963 : APIENTRY
13964 : CreateSymbolicLinkTransactedA (
13965 : __in LPCSTR lpSymlinkFileName,
13966 : __in LPCSTR lpTargetFileName,
13967 : __in DWORD dwFlags,
13968 : __in HANDLE hTransaction
13969 : );
13970 : BOOLEAN
13971 : APIENTRY
13972 : CreateSymbolicLinkTransactedW (
13973 : __in LPCWSTR lpSymlinkFileName,
13974 : __in LPCWSTR lpTargetFileName,
13975 : __in DWORD dwFlags,
13976 : __in HANDLE hTransaction
13977 : );
13978 : #ifdef UNICODE
13979 : #define CreateSymbolicLinkTransacted CreateSymbolicLinkTransactedW
13980 : #else
13981 : #define CreateSymbolicLinkTransacted CreateSymbolicLinkTransactedA
13982 : #endif // !UNICODE
13983 :
13984 : DWORD
13985 : WINAPI
13986 : GetFinalPathNameByHandleA (
13987 : __in HANDLE hFile,
13988 : __out_ecount(cchFilePath) LPSTR lpszFilePath,
13989 : __in DWORD cchFilePath,
13990 : __in DWORD dwFlags
13991 : );
13992 : DWORD
13993 : WINAPI
13994 : GetFinalPathNameByHandleW (
13995 : __in HANDLE hFile,
13996 : __out_ecount(cchFilePath) LPWSTR lpszFilePath,
13997 : __in DWORD cchFilePath,
13998 : __in DWORD dwFlags
13999 : );
14000 : #ifdef UNICODE
14001 : #define GetFinalPathNameByHandle GetFinalPathNameByHandleW
14002 : #else
14003 : #define GetFinalPathNameByHandle GetFinalPathNameByHandleA
14004 : #endif // !UNICODE
14005 :
14006 : #endif // (_WIN32_WINNT >= 0x0600)
14007 :
14008 :
14009 : #if (_WIN32_WINNT >= 0x0600)
14010 :
14011 : WINBASEAPI
14012 : BOOL
14013 : WINAPI
14014 : QueryActCtxSettingsW(
14015 : __in_opt DWORD dwFlags,
14016 : __in_opt HANDLE hActCtx,
14017 : __in_opt PCWSTR settingsNameSpace,
14018 : __in PCWSTR settingName,
14019 : __out_bcount_part_opt(dwBuffer, *pdwWrittenOrRequired) PWSTR pvBuffer,
14020 : __in SIZE_T dwBuffer,
14021 : __out_opt SIZE_T *pdwWrittenOrRequired
14022 : );
14023 :
14024 : #endif
14025 :
14026 :
14027 :
14028 :
14029 : #if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
14030 : #if defined(ISOLATION_AWARE_ENABLED) && (ISOLATION_AWARE_ENABLED != 0)
14031 : #include "winbase.inl"
14032 : #endif /* ISOLATION_AWARE_ENABLED */
14033 : #endif /* RC */
14034 :
14035 : #ifdef __cplusplus
14036 : }
14037 : #endif
14038 :
14039 :
14040 :
14041 : #endif // _WINBASE_
14042 :
14043 :
|