1 /* 2 Copyright (c) 2010-2012 250bpm s.r.o. 3 Copyright (c) 2007-2009 iMatix Corporation 4 Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file 5 6 This file is part of Crossroads I/O project. 7 8 Crossroads I/O is free software; you can redistribute it and/or modify it 9 under the terms of the GNU Lesser General Public License as published by 10 the Free Software Foundation; either version 3 of the License, or 11 (at your option) any later version. 12 13 Crossroads is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU Lesser General Public License for more details. 17 18 You should have received a copy of the GNU Lesser General Public License 19 along with this program. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #ifndef __XS_WINDOWS_HPP_INCLUDED__ 23 #define __XS_WINDOWS_HPP_INCLUDED__ 24 25 // The purpose of this header file is to turn on only the items actually 26 // needed on the windows platform. 27 28 #ifndef _CRT_SECURE_NO_WARNINGS 29 #define _CRT_SECURE_NO_WARNINGS 30 #endif 31 #ifndef WIN32_LEAN_AND_MEAN 32 #define WIN32_LEAN_AND_MEAN 33 #endif 34 #ifndef NOGDICAPMASKS 35 #define NOGDICAPMASKS // CC_*, LC_*, PC_*, CP_*, TC_*, RC_ 36 #endif 37 #ifndef NOVIRTUALKEYCODES 38 #define NOVIRTUALKEYCODES // VK_* 39 #endif 40 #ifndef NOWINSTYLES 41 #define NOWINSTYLES // WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_* 42 #endif 43 #ifndef NOSYSMETRICS 44 #define NOSYSMETRICS // SM_* 45 #endif 46 #ifndef NOMENUS 47 #define NOMENUS // MF_* 48 #endif 49 #ifndef NOICONS 50 #define NOICONS // IDI_* 51 #endif 52 #ifndef NOKEYSTATES 53 #define NOKEYSTATES // MK_* 54 #endif 55 #ifndef NOSYSCOMMANDS 56 #define NOSYSCOMMANDS // SC_* 57 #endif 58 #ifndef NORASTEROPS 59 #define NORASTEROPS // Binary and Tertiary raster ops 60 #endif 61 #ifndef NOSHOWWINDOW 62 #define NOSHOWWINDOW // SW_* 63 #endif 64 #ifndef OEMRESOURCE 65 #define OEMRESOURCE // OEM Resource values 66 #endif 67 #ifndef NOATOM 68 #define NOATOM // Atom Manager routines 69 #endif 70 #ifndef NOCLIPBOARD 71 #define NOCLIPBOARD // Clipboard routines 72 #endif 73 #ifndef NOCOLOR 74 #define NOCOLOR // Screen colors 75 #endif 76 #ifndef NODRAWTEXT 77 #define NODRAWTEXT // DrawText() and DT_* 78 #endif 79 #ifndef NOGDI 80 #define NOGDI // All GDI defines and routines 81 #endif 82 #ifndef NOKERNEL 83 #define NOKERNEL // All KERNEL defines and routines 84 #endif 85 #ifndef NONLS 86 #define NONLS // All NLS defines and routines 87 #endif 88 #ifndef NOMB 89 #define NOMB // MB_* and MessageBox() 90 #endif 91 #ifndef NOMEMMGR 92 #define NOMEMMGR // GMEM_*, LMEM_*, GHND, LHND, associated routines 93 #endif 94 #ifndef NOMETAFILE 95 #define NOMETAFILE // typedef METAFILEPICT 96 #endif 97 #ifndef NOMINMAX 98 #define NOMINMAX // Macros min(a,b) and max(a,b) 99 #endif 100 #ifndef NOOPENFILE 101 #define NOOPENFILE // OpenFile(), OemToAnsi, AnsiToOem, and OF_* 102 #endif 103 #ifndef NOSCROLL 104 #define NOSCROLL // SB_* and scrolling routines 105 #endif 106 #ifndef NOSERVICE 107 #define NOSERVICE // All Service Controller routines, SERVICE_ equates, etc. 108 #endif 109 #ifndef NOSOUND 110 #define NOSOUND // Sound driver routines 111 #endif 112 #ifndef NOTEXTMETRIC 113 #define NOTEXTMETRIC // typedef TEXTMETRIC and associated routines 114 #endif 115 #ifndef NOWH 116 #define NOWH // SetWindowsHook and WH_* 117 #endif 118 #ifndef NOWINOFFSETS 119 #define NOWINOFFSETS // GWL_*, GCL_*, associated routines 120 #endif 121 #ifndef NOCOMM 122 #define NOCOMM // COMM driver routines 123 #endif 124 #ifndef NOKANJI 125 #define NOKANJI // Kanji support stuff. 126 #endif 127 #ifndef NOHELP 128 #define NOHELP // Help engine interface. 129 #endif 130 #ifndef NOPROFILER 131 #define NOPROFILER // Profiler interface. 132 #endif 133 #ifndef NODEFERWINDOWPOS 134 #define NODEFERWINDOWPOS // DeferWindowPos routines 135 #endif 136 #ifndef NOMCX 137 #define NOMCX // Modem Configuration ExtensionsA 138 #endif 139 140 // Set target version to Windows Server 2003, Windows XP/SP1 or higher. 141 #ifndef _WIN32_WINNT 142 #define _WIN32_WINNT 0x0501 143 #endif 144 145 #include <windows.h> 146 147 #ifdef __MINGW32__ 148 // Require Windows XP or higher with MinGW for getaddrinfo(). 149 #if(_WIN32_WINNT >= 0x0501) 150 #else 151 #undef _WIN32_WINNT 152 #define _WIN32_WINNT 0x0501 153 #endif 154 #endif 155 156 #include <winsock2.h> 157 #include <mswsock.h> 158 159 #include <ws2tcpip.h> 160 #include <ipexport.h> 161 #include <process.h> 162 163 // In MinGW environment AI_NUMERICSERV is not defined. 164 #ifndef AI_NUMERICSERV 165 #define AI_NUMERICSERV 0x0400 166 #endif 167 168 #include <Shlobj.h> 169 170 #endif 171 172