1*f6dc9357SAndroid Build Coastguard Worker // StdAfx.h 2*f6dc9357SAndroid Build Coastguard Worker 3*f6dc9357SAndroid Build Coastguard Worker #ifndef ZIP7_INC_STDAFX_H 4*f6dc9357SAndroid Build Coastguard Worker #define ZIP7_INC_STDAFX_H 5*f6dc9357SAndroid Build Coastguard Worker 6*f6dc9357SAndroid Build Coastguard Worker #if defined(_MSC_VER) && _MSC_VER >= 1800 7*f6dc9357SAndroid Build Coastguard Worker #pragma warning(disable : 4464) // relative include path contains '..' 8*f6dc9357SAndroid Build Coastguard Worker #endif 9*f6dc9357SAndroid Build Coastguard Worker 10*f6dc9357SAndroid Build Coastguard Worker #include "../../../Common/Common.h" 11*f6dc9357SAndroid Build Coastguard Worker 12*f6dc9357SAndroid Build Coastguard Worker #endif 13*f6dc9357SAndroid Build Coastguard Worker 14*f6dc9357SAndroid Build Coastguard Worker /* 15*f6dc9357SAndroid Build Coastguard Worker WINVER and _WIN32_WINNT 16*f6dc9357SAndroid Build Coastguard Worker 17*f6dc9357SAndroid Build Coastguard Worker MSVC6 / 2003sdk: 18*f6dc9357SAndroid Build Coastguard Worker { 19*f6dc9357SAndroid Build Coastguard Worker <windows.h> doesn't set _WIN32_WINNT 20*f6dc9357SAndroid Build Coastguard Worker if WINVER is not set <windows.h> sets WINVER to value: 21*f6dc9357SAndroid Build Coastguard Worker 0x0400 : MSVC6 22*f6dc9357SAndroid Build Coastguard Worker 0x0501 : Windows Server 2003 PSDK / 2003 R2 PSDK 23*f6dc9357SAndroid Build Coastguard Worker } 24*f6dc9357SAndroid Build Coastguard Worker 25*f6dc9357SAndroid Build Coastguard Worker SDK for Win7 (and later) 26*f6dc9357SAndroid Build Coastguard Worker { 27*f6dc9357SAndroid Build Coastguard Worker <windows.h> sets _WIN32_WINNT if it's not set. 28*f6dc9357SAndroid Build Coastguard Worker <windows.h> sets WINVER if it's not set. 29*f6dc9357SAndroid Build Coastguard Worker <windows.h> includes <sdkddkver.h> that does: 30*f6dc9357SAndroid Build Coastguard Worker #if !defined(_WIN32_WINNT) && !defined(_CHICAGO_) 31*f6dc9357SAndroid Build Coastguard Worker #define _WIN32_WINNT 0x0601 // in win7 sdk 32*f6dc9357SAndroid Build Coastguard Worker #define _WIN32_WINNT 0x0A00 // in win10 sdk 33*f6dc9357SAndroid Build Coastguard Worker #endif 34*f6dc9357SAndroid Build Coastguard Worker #ifndef WINVER 35*f6dc9357SAndroid Build Coastguard Worker #ifdef _WIN32_WINNT 36*f6dc9357SAndroid Build Coastguard Worker #define WINVER _WIN32_WINNT 37*f6dc9357SAndroid Build Coastguard Worker else 38*f6dc9357SAndroid Build Coastguard Worker #define WINVER 0x0601 // in win7 sdk 39*f6dc9357SAndroid Build Coastguard Worker #define WINVER 0x0A00 // in win10 sdk 40*f6dc9357SAndroid Build Coastguard Worker endif 41*f6dc9357SAndroid Build Coastguard Worker #endif 42*f6dc9357SAndroid Build Coastguard Worker } 43*f6dc9357SAndroid Build Coastguard Worker 44*f6dc9357SAndroid Build Coastguard Worker Some GUI structures defined by windows will be larger, 45*f6dc9357SAndroid Build Coastguard Worker If (_WIN32_WINNT) value is larger. 46*f6dc9357SAndroid Build Coastguard Worker 47*f6dc9357SAndroid Build Coastguard Worker Also if we send sizeof(win_gui_struct) to some windows function, 48*f6dc9357SAndroid Build Coastguard Worker and we compile that code with big (_WIN32_WINNT) value, 49*f6dc9357SAndroid Build Coastguard Worker the window function in old Windows can fail, if that old Windows 50*f6dc9357SAndroid Build Coastguard Worker doesn't understand new big version of (win_gui_struct) compiled 51*f6dc9357SAndroid Build Coastguard Worker with big (_WIN32_WINNT) value. 52*f6dc9357SAndroid Build Coastguard Worker 53*f6dc9357SAndroid Build Coastguard Worker So it's better to define smallest (_WIN32_WINNT) value here. 54*f6dc9357SAndroid Build Coastguard Worker In 7-Zip FM we use some functions that require (_WIN32_WINNT == 0x0500). 55*f6dc9357SAndroid Build Coastguard Worker So it's simpler to define (_WIN32_WINNT == 0x0500) here. 56*f6dc9357SAndroid Build Coastguard Worker If we define (_WIN32_WINNT == 0x0400) here, we need some manual 57*f6dc9357SAndroid Build Coastguard Worker declarations for functions and macros that require (0x0500) functions. 58*f6dc9357SAndroid Build Coastguard Worker Also libs must contain these (0x0500+) functions. 59*f6dc9357SAndroid Build Coastguard Worker 60*f6dc9357SAndroid Build Coastguard Worker Some code in 7-zip FM uses also CommCtrl.h structures 61*f6dc9357SAndroid Build Coastguard Worker that depend from (_WIN32_IE) value. But default 62*f6dc9357SAndroid Build Coastguard Worker (_WIN32_IE) value from <windows.h> probably is OK for us. 63*f6dc9357SAndroid Build Coastguard Worker So we don't set _WIN32_IE here. 64*f6dc9357SAndroid Build Coastguard Worker default _WIN32_IE value set by <windows.h>: 65*f6dc9357SAndroid Build Coastguard Worker 0x501 2003sdk 66*f6dc9357SAndroid Build Coastguard Worker 0xa00 win10 sdk 67*f6dc9357SAndroid Build Coastguard Worker */ 68