TianoCore EDK2 master
Loading...
Searching...
No Matches
WinInclude.h
Go to the documentation of this file.
1
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 still
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#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION
26#if defined (MDE_CPU_IA32) && (_MSC_VER < 1800)
27#define InterlockedIncrement _WINNT_DUP_InterlockedIncrement
28#define InterlockedDecrement _WINNT_DUP_InterlockedDecrement
29#define InterlockedCompareExchange64 _WINNT_DUP_InterlockedCompareExchange64
30#endif
31#undef UNALIGNED
32#undef CONST
33#undef VOID
34#undef DEBUG_EVENT
35
36// WQBugBug: This typedef is to make "windows.h" buildable.
37// It should be removed after the root cause why
38// size_t is undefined when go into the line below is found.
39#if defined (MDE_CPU_IA32)
40typedef UINT32 size_t;
41#endif
42
43#include "windows.h"
44#include "windowsx.h"
45
46#undef GUID
47#undef _LIST_ENTRY
48#undef LIST_ENTRY
49#undef RUNTIME_FUNCTION
50#undef InterlockedIncrement
51#undef InterlockedDecrement
52#undef InterlockedCompareExchange64
53#undef InterlockedCompareExchangePointer
54#undef CreateEventEx
55
56#define VOID void
57
58//
59// Prevent collisions with Windows API name macros that deal with Unicode/Not issues
60//
61#undef LoadImage
62#undef CreateEvent
63#undef FAR
64
65//
66// Set the warnings back on as the EFI code must be /W4.
67//
68#pragma warning(default : 4115)
69#pragma warning(default : 4201)
70
71#endif