|
|
|
1 |
|
/*++ BUILD Version: 0091 Increment this if a change has global effects |
2 |
|
|
3 |
|
Copyright (c) Microsoft Corporation. All rights reserved. |
4 |
|
|
5 |
|
Module Name: |
6 |
|
|
7 |
|
winnt.h |
8 |
|
|
9 |
|
Abstract: |
10 |
|
|
11 |
|
This module defines the 32-Bit Windows types and constants that are |
12 |
|
defined by NT, but exposed through the Win32 API. |
13 |
|
|
14 |
|
Revision History: |
15 |
|
|
16 |
|
--*/ |
17 |
|
|
18 |
|
#ifndef _WINNT_ |
19 |
|
#define _WINNT_ |
20 |
|
|
21 |
|
#ifdef __cplusplus |
22 |
|
extern "C" { |
23 |
|
#endif |
24 |
|
|
25 |
|
#include <ctype.h> |
26 |
|
#define ANYSIZE_ARRAY 1 |
27 |
|
|
28 |
|
#include <specstrings.h> |
29 |
|
|
30 |
|
#if defined(_M_MRX000) && !(defined(MIDL_PASS) || defined(RC_INVOKED)) && defined(ENABLE_RESTRICTED) |
31 |
|
#define RESTRICTED_POINTER __restrict |
32 |
|
#else |
33 |
|
#define RESTRICTED_POINTER |
34 |
|
#endif |
35 |
|
|
36 |
|
#if defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64) || defined(_M_AMD64) |
37 |
|
#define ALIGNMENT_MACHINE |
38 |
|
#define UNALIGNED __unaligned |
39 |
|
#if defined(_WIN64) |
40 |
|
#define UNALIGNED64 __unaligned |
41 |
|
#else |
42 |
|
#define UNALIGNED64 |
43 |
|
#endif |
44 |
|
#else |
45 |
|
#undef ALIGNMENT_MACHINE |
46 |
|
#define UNALIGNED |
47 |
|
#define UNALIGNED64 |
48 |
|
#endif |
49 |
|
|
50 |
|
|
51 |
|
#if defined(_WIN64) || defined(_M_ALPHA) |
52 |
|
#define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG) |
53 |
|
#define MEMORY_ALLOCATION_ALIGNMENT 16 |
54 |
|
#else |
55 |
|
#define MAX_NATURAL_ALIGNMENT sizeof(DWORD) |
56 |
|
#define MEMORY_ALLOCATION_ALIGNMENT 8 |
57 |
|
#endif |
58 |
|
|
59 |
|
// |
60 |
|
// TYPE_ALIGNMENT will return the alignment requirements of a given type for |
61 |
|
// the current platform. |
62 |
|
// |
63 |
|
|
64 |
|
#ifdef __cplusplus |
65 |
|
#if _MSC_VER >= 1300 |
66 |
|
#define TYPE_ALIGNMENT( t ) __alignof(t) |
67 |
|
#endif |
68 |
|
#else |
69 |
|
#define TYPE_ALIGNMENT( t ) \ |
70 |
|
FIELD_OFFSET( struct { char x; t test; }, test ) |
71 |
|
#endif |
72 |
|
|
73 |
|
#if defined(_WIN64) |
74 |
|
|
75 |
|
#if defined(_AMD64_) |
76 |
|
#define PROBE_ALIGNMENT( _s ) TYPE_ALIGNMENT( DWORD ) |
77 |
|
#elif defined(_IA64_) |
78 |
|
#define PROBE_ALIGNMENT( _s ) (TYPE_ALIGNMENT( _s ) > TYPE_ALIGNMENT( DWORD ) ? \ |
79 |
|
TYPE_ALIGNMENT( _s ) : TYPE_ALIGNMENT( DWORD )) |
80 |
|
#else |
81 |
|
#error "No Target Architecture" |
82 |
|
#endif |
83 |
|
|
84 |
|
#define PROBE_ALIGNMENT32( _s ) TYPE_ALIGNMENT( DWORD ) |
85 |
|
|
86 |
|
#else |
87 |
|
|
88 |
|
#define PROBE_ALIGNMENT( _s ) TYPE_ALIGNMENT( DWORD ) |
89 |
|
|
90 |
|
#endif |
91 |
|
|
92 |
|
// |
93 |
|
// C_ASSERT() can be used to perform many compile-time assertions: |
94 |
|
// type sizes, field offsets, etc. |
95 |
|
// |
96 |
|
// An assertion failure results in error C2118: negative subscript. |
321 |
|
|
322 |
|
#define UCSCHAR_INVALID_CHARACTER (0xffffffff) |
323 |
|
|
324 |
|
#define MIN_UCSCHAR (0) |
325 |
|
|
326 |
|
// |
327 |
|
// We'll assume here that the ISO-10646 / Unicode agreement |
328 |
|
// not to assign code points after U+0010FFFF holds so that |
329 |
|
// we do not have to have separate "UCSCHAR" and "UNICODECHAR" |
330 |
|
// types. |
331 |
|
// |
332 |
|
|
333 |
|
#define MAX_UCSCHAR (0x0010FFFF) |
334 |
|
|
335 |
|
typedef UCSCHAR *PUCSCHAR; |
336 |
|
typedef const UCSCHAR *PCUCSCHAR; |
337 |
|
|
338 |
|
typedef UCSCHAR *PUCSSTR; |
339 |
|
typedef UCSCHAR UNALIGNED *PUUCSSTR; |
340 |
|
|
341 |
|
typedef const UCSCHAR *PCUCSSTR; |
342 |
|
typedef const UCSCHAR UNALIGNED *PCUUCSSTR; |
343 |
|
|
344 |
|
typedef UCSCHAR UNALIGNED *PUUCSCHAR; |
345 |
|
typedef const UCSCHAR UNALIGNED *PCUUCSCHAR; |
346 |
|
|
347 |
|
#endif // _WIN32_WINNT >= 0x0600 |
348 |
|
|
349 |
|
|
350 |
|
// |
351 |
|
// ANSI (Multi-byte Character) types |
352 |
|
// |
353 |
|
typedef CHAR *PCHAR, *LPCH, *PCH; |
354 |
|
typedef CONST CHAR *LPCCH, *PCCH; |
355 |
|
|
356 |
|
typedef __nullterminated CHAR *NPSTR, *LPSTR, *PSTR; |
357 |
|
typedef __nullterminated PSTR *PZPSTR; |
358 |
|
typedef __nullterminated CONST PSTR *PCZPSTR; |
359 |
|
typedef __nullterminated CONST CHAR *LPCSTR, *PCSTR; |
360 |
|
typedef __nullterminated PCSTR *PZPCSTR; |
361 |
|
|
362 |
|
// |
363 |
|
// Neutral ANSI/UNICODE types and macros |
364 |
|
// |
365 |
|
#ifdef UNICODE // r_winnt |
366 |
|
|
367 |
|
#ifndef _TCHAR_DEFINED |
368 |
|
typedef WCHAR TCHAR, *PTCHAR; |
369 |
|
typedef WCHAR TBYTE , *PTBYTE ; |
370 |
|
#define _TCHAR_DEFINED |
371 |
|
#endif /* !_TCHAR_DEFINED */ |
372 |
|
|
373 |
|
typedef LPWCH LPTCH, PTCH; |
374 |
|
typedef LPWSTR PTSTR, LPTSTR; |
375 |
|
typedef LPCWSTR PCTSTR, LPCTSTR; |
376 |
|
typedef LPUWSTR PUTSTR, LPUTSTR; |
377 |
|
typedef LPCUWSTR PCUTSTR, LPCUTSTR; |
378 |
|
typedef LPWSTR LP; |
379 |
|
#define __TEXT(quote) L##quote // r_winnt |
380 |
|
|
381 |
|
#else /* UNICODE */ // r_winnt |
382 |
|
|
383 |
|
#ifndef _TCHAR_DEFINED |
384 |
|
typedef char TCHAR, *PTCHAR; |
385 |
|
typedef unsigned char TBYTE , *PTBYTE ; |
386 |
|
#define _TCHAR_DEFINED |
387 |
|
#endif /* !_TCHAR_DEFINED */ |
388 |
|
|
389 |
|
typedef LPCH LPTCH, PTCH; |
390 |
|
typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR; |
391 |
|
typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR; |
392 |
|
#define __TEXT(quote) quote // r_winnt |
393 |
|
|
394 |
|
#endif /* UNICODE */ // r_winnt |
395 |
|
#define TEXT(quote) __TEXT(quote) // r_winnt |
396 |
|
|
397 |
|
|
398 |
|
typedef SHORT *PSHORT; |
399 |
|
typedef LONG *PLONG; |
400 |
|
|
401 |
|
#ifdef STRICT |
402 |
|
typedef void *HANDLE; |
403 |
|
#define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name |
404 |
|
#else |
405 |
|
typedef PVOID HANDLE; |
406 |
|
#define DECLARE_HANDLE(name) typedef HANDLE name |
407 |
|
#endif |
408 |
|
typedef HANDLE *PHANDLE; |
409 |
|
|
410 |
|
// |
411 |
|
// Flag (bit) fields |
412 |
|
// |
413 |
|
|
414 |
|
typedef BYTE FCHAR; |
415 |
|
typedef WORD FSHORT; |
416 |
|
typedef DWORD FLONG; |
417 |
|
|
418 |
|
// Component Object Model defines, and macros |
419 |
|
|
420 |
|
#ifndef _HRESULT_DEFINED |
421 |
|
#define _HRESULT_DEFINED |
422 |
|
#ifdef __midl |
423 |
|
typedef LONG HRESULT; |
424 |
|
#else |
425 |
|
typedef __success(return >= 0) long HRESULT; |
426 |
|
#endif // __midl |
427 |
|
#endif // !_HRESULT_DEFINED |
428 |
|
|
429 |
|
#ifdef __cplusplus |
430 |
|
#define EXTERN_C extern "C" |
431 |
|
#else |
432 |
|
#define EXTERN_C extern |
433 |
|
#endif |
434 |
|
|
435 |
|
#if defined(_WIN32) || defined(_MPPC_) |
436 |
|
|
1917 |
|
_BitScanReverse64 ( |
1918 |
|
__out DWORD *Index, |
1919 |
|
__in DWORD64 Mask |
1920 |
|
); |
1921 |
|
|
1922 |
|
#pragma intrinsic(_BitScanForward) |
1923 |
|
#pragma intrinsic(_BitScanReverse) |
1924 |
|
#pragma intrinsic(_BitScanForward64) |
1925 |
|
#pragma intrinsic(_BitScanReverse64) |
1926 |
|
|
1927 |
|
// |
1928 |
|
// Interlocked intrinsic functions. |
1929 |
|
// |
1930 |
|
|
1931 |
|
#define InterlockedIncrement16 _InterlockedIncrement16 |
1932 |
|
#define InterlockedDecrement16 _InterlockedDecrement16 |
1933 |
|
#define InterlockedCompareExchange16 _InterlockedCompareExchange16 |
1934 |
|
|
1935 |
|
#define InterlockedAnd _InterlockedAnd |
1936 |
|
#define InterlockedOr _InterlockedOr |
1937 |
|
#define InterlockedXor _InterlockedXor |
1938 |
|
#define InterlockedIncrement _InterlockedIncrement |
1939 |
|
#define InterlockedIncrementAcquire InterlockedIncrement |
1940 |
|
#define InterlockedIncrementRelease InterlockedIncrement |
1941 |
|
#define InterlockedDecrement _InterlockedDecrement |
1942 |
|
#define InterlockedDecrementAcquire InterlockedDecrement |
1943 |
|
#define InterlockedDecrementRelease InterlockedDecrement |
1944 |
|
#define InterlockedAdd _InterlockedAdd |
1945 |
|
#define InterlockedExchange _InterlockedExchange |
1946 |
|
#define InterlockedExchangeAdd _InterlockedExchangeAdd |
1947 |
|
#define InterlockedCompareExchange _InterlockedCompareExchange |
1948 |
|
#define InterlockedCompareExchangeAcquire InterlockedCompareExchange |
1949 |
|
#define InterlockedCompareExchangeRelease InterlockedCompareExchange |
1950 |
|
|
1951 |
|
#define InterlockedAnd64 _InterlockedAnd64 |
1952 |
|
#define InterlockedAndAffinity InterlockedAnd64 |
1953 |
|
#define InterlockedOr64 _InterlockedOr64 |
1954 |
|
#define InterlockedOrAffinity InterlockedOr64 |
1955 |
|
#define InterlockedXor64 _InterlockedXor64 |
1956 |
|
#define InterlockedIncrement64 _InterlockedIncrement64 |
1957 |
|
#define InterlockedDecrement64 _InterlockedDecrement64 |
1958 |
|
#define InterlockedAdd64 _InterlockedAdd64 |
1959 |
|
#define InterlockedExchange64 _InterlockedExchange64 |
1960 |
|
#define InterlockedExchangeAcquire64 InterlockedExchange64 |
1961 |
|
#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64 |
1962 |
|
#define InterlockedCompareExchange64 _InterlockedCompareExchange64 |
1963 |
|
#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64 |
1964 |
|
#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64 |
1965 |
|
|
1966 |
|
#define InterlockedExchangePointer _InterlockedExchangePointer |
1967 |
|
#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer |
1968 |
|
#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer |
1969 |
|
#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer |
1970 |
|
|
1971 |
|
#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONG64 *)a, b) |
1972 |
|
#define InterlockedIncrementSizeT(a) InterlockedIncrement64((LONG64 *)a) |
1973 |
|
#define InterlockedDecrementSizeT(a) InterlockedDecrement64((LONG64 *)a) |
1974 |
|
|
1975 |
|
SHORT |
1976 |
|
InterlockedIncrement16 ( |
1977 |
|
__inout SHORT volatile *Addend |
1978 |
|
); |
1979 |
|
|
1980 |
|
SHORT |
1981 |
|
InterlockedDecrement16 ( |
1982 |
|
__inout SHORT volatile *Addend |
1983 |
|
); |
1984 |
|
|
1985 |
|
SHORT |
1986 |
|
InterlockedCompareExchange16 ( |
1987 |
|
__inout SHORT volatile *Destination, |
1988 |
|
__in SHORT ExChange, |
1989 |
|
__in SHORT Comperand |
1990 |
|
); |
1991 |
|
|
1992 |
|
LONG |
1993 |
|
InterlockedAnd ( |
1994 |
|
__inout LONG volatile *Destination, |
1995 |
|
__in LONG Value |
1996 |
|
); |
1997 |
|
|
1998 |
|
LONG |
1999 |
|
InterlockedOr ( |
2000 |
|
__inout LONG volatile *Destination, |
2001 |
|
__in LONG Value |
2002 |
|
); |
2003 |
|
|
2004 |
|
LONG |
2005 |
|
InterlockedXor ( |
2006 |
|
__inout LONG volatile *Destination, |
2007 |
|
__in LONG Value |
2008 |
|
); |
2009 |
|
|
2010 |
|
LONG64 |
2011 |
|
InterlockedAnd64 ( |
2012 |
|
__inout LONG64 volatile *Destination, |
2013 |
|
__in LONG64 Value |
2014 |
|
); |
2015 |
|
|
2016 |
|
LONG64 |
2225 |
|
// |
2226 |
|
// Define memory fence intrinsics |
2227 |
|
// |
2228 |
|
|
2229 |
|
#define FastFence __faststorefence |
2230 |
|
#define LoadFence _mm_lfence |
2231 |
|
#define MemoryFence _mm_mfence |
2232 |
|
#define StoreFence _mm_sfence |
2233 |
|
|
2234 |
|
VOID |
2235 |
|
__faststorefence ( |
2236 |
|
VOID |
2237 |
|
); |
2238 |
|
|
2239 |
|
VOID |
2240 |
|
_mm_lfence ( |
2241 |
|
VOID |
2242 |
|
); |
2243 |
|
|
2244 |
|
VOID |
2245 |
|
_mm_mfence ( |
2246 |
|
VOID |
2247 |
|
); |
2248 |
|
|
2249 |
|
VOID |
2250 |
|
_mm_sfence ( |
2251 |
|
VOID |
2252 |
|
); |
2253 |
|
|
2254 |
|
VOID |
2255 |
|
_mm_pause ( |
2256 |
|
VOID |
2257 |
|
); |
2258 |
|
|
2259 |
|
VOID |
2260 |
|
_mm_prefetch ( |
2261 |
|
__in CHAR CONST *a, |
2262 |
|
__in int sel |
2263 |
|
); |
2264 |
|
|
2265 |
|
VOID |
2266 |
|
_m_prefetchw ( |
2267 |
|
__in volatile CONST VOID *Source |
2268 |
|
); |
2269 |
|
|
2270 |
|
// |
2271 |
|
// Define constants for use with _mm_prefetch. |
2272 |
|
// |
2273 |
|
|
2274 |
|
#define _MM_HINT_T0 1 |
2275 |
|
#define _MM_HINT_T1 2 |
2276 |
|
#define _MM_HINT_T2 3 |
2277 |
|
#define _MM_HINT_NTA 0 |
2278 |
|
|
2279 |
|
#pragma intrinsic(__faststorefence) |
2280 |
|
#pragma intrinsic(_mm_pause) |
2281 |
|
#pragma intrinsic(_mm_prefetch) |
2282 |
|
#pragma intrinsic(_mm_lfence) |
2283 |
|
#pragma intrinsic(_mm_mfence) |
2284 |
|
#pragma intrinsic(_mm_sfence) |
2285 |
|
#pragma intrinsic(_m_prefetchw) |
2286 |
|
|
2287 |
|
#define YieldProcessor _mm_pause |
2288 |
|
#define MemoryBarrier __faststorefence |
2289 |
|
#define PreFetchCacheLine(l, a) _mm_prefetch((CHAR CONST *) a, l) |
2290 |
|
#define PrefetchForWrite(p) _m_prefetchw(p) |
2291 |
|
#define ReadForWriteAccess(p) (_m_prefetchw(p), *(p)) |
2292 |
|
|
2293 |
|
// |
2294 |
|
// PreFetchCacheLine level defines. |
2295 |
|
// |
2296 |
|
|
2297 |
|
#define PF_TEMPORAL_LEVEL_1 _MM_HINT_T0 |
2298 |
|
#define PF_TEMPORAL_LEVEL_2 _MM_HINT_T1 |
2299 |
|
#define PF_TEMPORAL_LEVEL_3 _MM_HINT_T2 |
2300 |
|
#define PF_NON_TEMPORAL_LEVEL_ALL _MM_HINT_NTA |
2301 |
|
|
2302 |
|
// |
2303 |
|
// Define get/set MXCSR intrinsics. |
2304 |
|
// |
2305 |
|
|
2306 |
|
#define ReadMxCsr _mm_getcsr |
2307 |
|
#define WriteMxCsr _mm_setcsr |
2308 |
|
|
2309 |
|
unsigned int |
2310 |
|
_mm_getcsr ( |
2311 |
|
VOID |
2312 |
|
); |
2313 |
|
|
2314 |
|
VOID |
2315 |
|
_mm_setcsr ( |
2316 |
|
__in unsigned int MxCsr |
2317 |
|
); |
2318 |
|
|
2319 |
|
#pragma intrinsic(_mm_getcsr) |
2320 |
|
#pragma intrinsic(_mm_setcsr) |
2321 |
|
|
2322 |
|
// |
2323 |
|
// Assert exception. |
2324 |
|
// |
2325 |
|
|
2326 |
|
VOID |
2327 |
|
__int2c ( |
3846 |
|
#define InterlockedAddAcquire _InterlockedAdd_acq |
3847 |
|
#define InterlockedAddRelease _InterlockedAdd_rel |
3848 |
|
|
3849 |
|
#define InterlockedIncrement _InterlockedIncrement |
3850 |
|
#define InterlockedIncrementAcquire _InterlockedIncrement_acq |
3851 |
|
#define InterlockedIncrementRelease _InterlockedIncrement_rel |
3852 |
|
|
3853 |
|
#define InterlockedDecrement _InterlockedDecrement |
3854 |
|
#define InterlockedDecrementAcquire _InterlockedDecrement_acq |
3855 |
|
#define InterlockedDecrementRelease _InterlockedDecrement_rel |
3856 |
|
|
3857 |
|
#define InterlockedExchange _InterlockedExchange |
3858 |
|
#define InterlockedExchangeAcquire _InterlockedExchange_acq |
3859 |
|
|
3860 |
|
#define InterlockedExchangeAdd _InterlockedExchangeAdd |
3861 |
|
#define InterlockedExchangeAddAcquire _InterlockedExchangeAdd_acq |
3862 |
|
#define InterlockedExchangeAddRelease _InterlockedExchangeAdd_rel |
3863 |
|
|
3864 |
|
#define InterlockedAdd64 _InterlockedAdd64 |
3865 |
|
#define InterlockedAddAcquire64 _InterlockedAdd64_acq |
3866 |
|
#define InterlockedAddRelease64 _InterlockedAdd64_rel |
3867 |
|
|
3868 |
|
#define InterlockedIncrement64 _InterlockedIncrement64 |
3869 |
|
#define InterlockedIncrementAcquire64 _InterlockedIncrement64_acq |
3870 |
|
#define InterlockedIncrementRelease64 _InterlockedIncrement64_rel |
3871 |
|
|
3872 |
|
#define InterlockedDecrement64 _InterlockedDecrement64 |
3873 |
|
#define InterlockedDecrementAcquire64 _InterlockedDecrement64_acq |
3874 |
|
#define InterlockedDecrementRelease64 _InterlockedDecrement64_rel |
3875 |
|
|
3876 |
|
#define InterlockedExchange64 _InterlockedExchange64 |
3877 |
|
#define InterlockedExchangeAcquire64 _InterlockedExchange64_acq |
3878 |
|
|
3879 |
|
#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64 |
3880 |
|
#define InterlockedExchangeAddAcquire64 _InterlockedExchangeAdd64_acq |
3881 |
|
#define InterlockedExchangeAddRelease64 _InterlockedExchangeAdd64_rel |
3882 |
|
|
3883 |
|
#define InterlockedCompareExchange64 _InterlockedCompareExchange64 |
3884 |
|
#define InterlockedCompareExchangeAcquire64 _InterlockedCompareExchange64_acq |
3885 |
|
#define InterlockedCompareExchangeRelease64 _InterlockedCompareExchange64_rel |
3886 |
|
|
3887 |
|
#define InterlockedCompare64Exchange128 _InterlockedCompare64Exchange128 |
3888 |
|
#define InterlockedCompare64ExchangeAcquire128 _InterlockedCompare64Exchange128_acq |
3889 |
|
#define InterlockedCompare64ExchangeRelease128 _InterlockedCompare64Exchange128_rel |
3890 |
|
|
3891 |
|
#define InterlockedCompareExchange _InterlockedCompareExchange |
3892 |
|
#define InterlockedCompareExchangeAcquire _InterlockedCompareExchange_acq |
3893 |
|
#define InterlockedCompareExchangeRelease _InterlockedCompareExchange_rel |
3894 |
|
|
3895 |
|
#define InterlockedExchangePointer _InterlockedExchangePointer |
3896 |
|
#define InterlockedExchangePointerAcquire _InterlockedExchangePointer_acq |
3897 |
|
|
3898 |
|
#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer |
3899 |
|
#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer_rel |
3900 |
|
#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer_acq |
3901 |
|
|
3902 |
|
|
3903 |
|
#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONG64 *)a, b) |
3904 |
|
#define InterlockedIncrementSizeT(a) InterlockedIncrement64((LONG64 *)a) |
3905 |
|
#define InterlockedDecrementSizeT(a) InterlockedDecrement64((LONG64 *)a) |
3906 |
|
|
3907 |
|
#define InterlockedOr _InterlockedOr |
3908 |
|
#define InterlockedOrAcquire _InterlockedOr_acq |
3909 |
|
#define InterlockedOrRelease _InterlockedOr_rel |
3910 |
|
#define InterlockedOr8 _InterlockedOr8 |
3911 |
|
#define InterlockedOr8Acquire _InterlockedOr8_acq |
3912 |
|
#define InterlockedOr8Release _InterlockedOr8_rel |
3913 |
|
#define InterlockedOr16 _InterlockedOr16 |
3914 |
|
#define InterlockedOr16Acquire _InterlockedOr16_acq |
3915 |
|
#define InterlockedOr16Release _InterlockedOr16_rel |
3916 |
|
#define InterlockedOr64 _InterlockedOr64 |
3917 |
|
#define InterlockedOr64Acquire _InterlockedOr64_acq |
3918 |
|
#define InterlockedOr64Release _InterlockedOr64_rel |
3919 |
|
#define InterlockedXor _InterlockedXor |
3920 |
|
#define InterlockedXorAcquire _InterlockedXor_acq |
3921 |
|
#define InterlockedXorRelease _InterlockedXor_rel |
3922 |
|
#define InterlockedXor8 _InterlockedXor8 |
3923 |
|
#define InterlockedXor8Acquire _InterlockedXor8_acq |
3924 |
|
#define InterlockedXor8Release _InterlockedXor8_rel |
3925 |
|
#define InterlockedXor16 _InterlockedXor16 |
3926 |
|
#define InterlockedXor16Acquire _InterlockedXor16_acq |
3927 |
|
#define InterlockedXor16Release _InterlockedXor16_rel |
3928 |
|
#define InterlockedXor64 _InterlockedXor64 |
3929 |
|
#define InterlockedXor64Acquire _InterlockedXor64_acq |
3930 |
|
#define InterlockedXor64Release _InterlockedXor64_rel |
3931 |
|
#define InterlockedAnd _InterlockedAnd |
3932 |
|
#define InterlockedAndAcquire _InterlockedAnd_acq |
3933 |
|
#define InterlockedAndRelease _InterlockedAnd_rel |
3934 |
|
#define InterlockedAnd8 _InterlockedAnd8 |
3935 |
|
#define InterlockedAnd8Acquire _InterlockedAnd8_acq |
3936 |
|
#define InterlockedAnd8Release _InterlockedAnd8_rel |
3937 |
|
#define InterlockedAnd16 _InterlockedAnd16 |
3938 |
|
#define InterlockedAnd16Acquire _InterlockedAnd16_acq |
3939 |
|
#define InterlockedAnd16Release _InterlockedAnd16_rel |
3940 |
|
#define InterlockedAnd64 _InterlockedAnd64 |
3941 |
|
#define InterlockedAnd64Acquire _InterlockedAnd64_acq |
3942 |
|
#define InterlockedAnd64Release _InterlockedAnd64_rel |
3943 |
|
|
3944 |
|
#ifdef __cplusplus |
3945 |
|
extern "C" { |
12929 |
|
#if defined(_M_IX86) && !defined(MIDL_PASS) |
12930 |
|
|
12931 |
|
#define PcTeb 0x18 |
12932 |
|
|
12933 |
|
#if (_MSC_FULL_VER >= 13012035) |
12934 |
|
|
12935 |
|
__inline struct _TEB * NtCurrentTeb( void ) { return (struct _TEB *) (ULONG_PTR) __readfsdword (PcTeb); } |
12936 |
|
|
12937 |
|
#else |
12938 |
|
|
12939 |
|
#if _MSC_VER >= 1200 |
12940 |
|
#pragma warning(push) |
12941 |
|
#endif |
12942 |
|
|
12943 |
|
#pragma warning (disable:4035) // disable 4035 (function must return something) |
12944 |
|
|
12945 |
|
__inline struct _TEB * NtCurrentTeb( void ) { __asm mov eax, fs:[PcTeb] } |
12946 |
|
|
12947 |
|
#if _MSC_VER >= 1200 |
12948 |
|
#pragma warning(pop) |
12949 |
|
#else |
12950 |
|
#pragma warning (default:4035) // reenable it |
12951 |
|
#endif |
12952 |
|
|
12953 |
|
#endif |
12954 |
|
|
12955 |
|
#endif // defined(_M_IX86) && !defined(MIDL_PASS) |
12956 |
|
|
12957 |
|
#if (_WIN32_WINNT > 0x0500) || (_WIN32_FUSION >= 0x0100) || ISOLATION_AWARE_ENABLED // winnt_only |
12958 |
|
#define ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION (1) |
12959 |
|
#define ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION (2) |
12960 |
|
#define ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION (3) |
12961 |
|
#define ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION (4) |
12962 |
|
#define ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION (5) |
12963 |
|
#define ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION (6) |
12964 |
|
#define ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION (7) |
12965 |
|
#define ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE (8) |
12966 |
|
#define ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES (9) |
12967 |
|
#define ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS (10) |
12968 |
|
#endif // winnt_only |
12969 |
|
|
12970 |
|
#ifdef __cplusplus |
12971 |
|
} |
12972 |
|
#endif |
12973 |
|
|
12974 |
|
#endif /* _WINNT_ */ |
12975 |
|
|
12976 |
|
|
12977 |
|
|
|
|
|