]> git.proxmox.com Git - mirror_edk2.git/blob - EmulatorPkg/Win/Host/WinInclude.h
WinHost: Add SimplePointer support
[mirror_edk2.git] / EmulatorPkg / Win / Host / WinInclude.h
1 /**@file
2 Public include file for the WinNt Library
3
4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6 **/
7
8 #ifndef __WIN_NT_INCLUDE_H__
9 #define __WIN_NT_INCLUDE_H__
10
11 //
12 // Win32 include files do not compile clean with /W4, so we use the warning
13 // pragma to suppress the warnings for Win32 only. This way our code can stil
14 // compile at /W4 (highest warning level) with /WX (warnings cause build
15 // errors).
16 //
17 #pragma warning(disable : 4115)
18 #pragma warning(disable : 4201)
19 #pragma warning(disable : 4028)
20 #pragma warning(disable : 4133)
21
22 #define GUID _WINNT_DUP_GUID_____
23 #define _LIST_ENTRY _WINNT_DUP_LIST_ENTRY_FORWARD
24 #define LIST_ENTRY _WINNT_DUP_LIST_ENTRY
25 #if defined (MDE_CPU_IA32) && (_MSC_VER < 1800)
26 #define InterlockedIncrement _WINNT_DUP_InterlockedIncrement
27 #define InterlockedDecrement _WINNT_DUP_InterlockedDecrement
28 #define InterlockedCompareExchange64 _WINNT_DUP_InterlockedCompareExchange64
29 #endif
30 #undef UNALIGNED
31 #undef CONST
32 #undef VOID
33 #undef DEBUG_EVENT
34
35 // WQBugBug: This typedef is to make "windows.h" buildable.
36 // It should be removed after the root cause why
37 // size_t is undefined when go into the line below is found.
38 #if defined (MDE_CPU_IA32)
39 typedef UINT32 size_t ;
40 #endif
41
42 #include "windows.h"
43 #include "windowsx.h"
44
45 #undef GUID
46 #undef _LIST_ENTRY
47 #undef LIST_ENTRY
48 #undef InterlockedIncrement
49 #undef InterlockedDecrement
50 #undef InterlockedCompareExchange64
51 #undef InterlockedCompareExchangePointer
52 #undef CreateEventEx
53
54 #define VOID void
55
56 //
57 // Prevent collisions with Windows API name macros that deal with Unicode/Not issues
58 //
59 #undef LoadImage
60 #undef CreateEvent
61 #undef FAR
62
63 //
64 // Set the warnings back on as the EFI code must be /W4.
65 //
66 #pragma warning(default : 4115)
67 #pragma warning(default : 4201)
68
69
70 #endif