• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* 7zWindows.h -- StdAfx
2 2023-04-02 : Igor Pavlov : Public domain */
3 
4 #ifndef ZIP7_INC_7Z_WINDOWS_H
5 #define ZIP7_INC_7Z_WINDOWS_H
6 
7 #ifdef _WIN32
8 
9 #if defined(__clang__)
10 # pragma clang diagnostic push
11 #endif
12 
13 #if defined(_MSC_VER)
14 
15 #pragma warning(push)
16 #pragma warning(disable : 4668) // '_WIN32_WINNT' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
17 
18 #if _MSC_VER == 1900
19 // for old kit10 versions
20 // #pragma warning(disable : 4255) // winuser.h(13979): warning C4255: 'GetThreadDpiAwarenessContext':
21 #endif
22 // win10 Windows Kit:
23 #endif // _MSC_VER
24 
25 #if defined(_MSC_VER) && _MSC_VER <= 1200 && !defined(_WIN64)
26 // for msvc6 without sdk2003
27 #define RPC_NO_WINDOWS_H
28 #endif
29 
30 #if defined(__MINGW32__) || defined(__MINGW64__)
31 // #if defined(__GNUC__) && !defined(__clang__)
32 #include <windows.h>
33 #else
34 #include <Windows.h>
35 #endif
36 // #include <basetsd.h>
37 // #include <wtypes.h>
38 
39 // but if precompiled with clang-cl then we need
40 // #include <windows.h>
41 #if defined(_MSC_VER)
42 #pragma warning(pop)
43 #endif
44 
45 #if defined(__clang__)
46 # pragma clang diagnostic pop
47 #endif
48 
49 #if defined(_MSC_VER) && _MSC_VER <= 1200 && !defined(_WIN64)
50 #ifndef _W64
51 
52 typedef long LONG_PTR, *PLONG_PTR;
53 typedef unsigned long ULONG_PTR, *PULONG_PTR;
54 typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
55 
56 #define Z7_OLD_WIN_SDK
57 #endif // _W64
58 #endif // _MSC_VER == 1200
59 
60 #ifdef Z7_OLD_WIN_SDK
61 
62 #ifndef INVALID_FILE_ATTRIBUTES
63 #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
64 #endif
65 #ifndef INVALID_SET_FILE_POINTER
66 #define INVALID_SET_FILE_POINTER ((DWORD)-1)
67 #endif
68 #ifndef FILE_SPECIAL_ACCESS
69 #define FILE_SPECIAL_ACCESS    (FILE_ANY_ACCESS)
70 #endif
71 
72 // ShlObj.h:
73 // #define BIF_NEWDIALOGSTYLE     0x0040
74 
75 #pragma warning(disable : 4201)
76 // #pragma warning(disable : 4115)
77 
78 #undef  VARIANT_TRUE
79 #define VARIANT_TRUE ((VARIANT_BOOL)-1)
80 #endif
81 
82 #endif // Z7_OLD_WIN_SDK
83 
84 #ifdef UNDER_CE
85 #undef  VARIANT_TRUE
86 #define VARIANT_TRUE ((VARIANT_BOOL)-1)
87 #endif
88 
89 
90 #if defined(_MSC_VER)
91 #if _MSC_VER >= 1400 && _MSC_VER <= 1600
92   // BaseTsd.h(148) : 'HandleToULong' : unreferenced inline function has been removed
93   // string.h
94   // #pragma warning(disable : 4514)
95 #endif
96 #endif
97 
98 
99 /* #include "7zTypes.h" */
100 
101 #endif
102