Skip to content

Commit 9195501

Browse files
Change our Windows header version to WinXP
This ensures that the resulting code will always run on XP.
1 parent a876b1d commit 9195501

5 files changed

Lines changed: 17 additions & 12 deletions

File tree

config/win32.gypi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@
122122
'_CRT_SECURE_NO_DEPRECATE',
123123
'_CRT_DISABLE_PERFCRIT_LOCKS',
124124
'__LITTLE_ENDIAN__',
125+
'WINVER=_WIN32_WINNT_WINXP',
126+
'_WIN32_WINNT=_WIN32_WINNT_WINXP',
125127
],
126128

127129
'target_conditions':

engine/src/w32ans.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
4141

4242
#include <strsafe.h>
4343

44+
// We need the Vista versions of the shell headers
45+
#undef NTDDI_VERSION
46+
#define NTDDI_VERSION NTDDI_VISTA
47+
#include <shobjidl.h>
48+
#include <shlobj.h>
49+
#include <shlwapi.h>
50+
4451
extern void MCRemoteFileDialog(MCStringRef p_title, MCStringRef p_prompt, MCStringRef *p_types, uint32_t p_type_count, MCStringRef p_initial_folder, MCStringRef p_initial_file, bool p_save, bool p_files, MCStringRef &r_value);
4552
extern void MCRemoteFolderDialog(MCStringRef p_title, MCStringRef p_prompt, MCStringRef p_initial, MCStringRef &r_value);
4653
extern void MCRemoteColorDialog(MCStringRef p_title, uint32_t p_red, uint32_t p_green, uint32_t p_blue, bool& r_chosen, MCColor& r_chosen_color);

engine/src/w32dnd.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
1717
#ifndef __W32DND__
1818
#define __W32DND__
1919

20+
#include <shobjidl.h>
21+
#include <shlobj.h>
22+
#include <shlwapi.h>
23+
2024
///////////////////////////////////////////////////////////////////////////////
2125
//
2226
// Class:

engine/src/w32prefix.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,13 @@ for more details.
1414
You should have received a copy of the GNU General Public License
1515
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
1616

17-
#define _WIN32_WINNT 0x0500
18-
#define NTDDI_VERSION 0x05000400
19-
2017
#define WIN32_LEAN_AND_MEAN
2118

2219
#include <windows.h>
2320

2421
// w32dcw32
2522
#include <winsock2.h>
2623

27-
// w32ans
28-
#undef NTDDI_VERSION
29-
#define NTDDI_VERSION NTDDI_VISTA
30-
#include <shobjidl.h>
31-
#include <shlobj.h>
32-
#include <shlwapi.h>
33-
#undef NTDDI_VERSION
34-
#define NTDDI_VERSION 0x05000400
35-
3624
// w32clipboard
3725
#include <objidl.h>
3826

engine/src/w32relaunch.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
3838

3939
#include "w32dc.h"
4040

41+
#include <shobjidl.h>
42+
#include <shlobj.h>
43+
#include <shlwapi.h>
44+
4145
#ifdef FEATURE_RELAUNCH_SUPPORT
4246

4347
#define CWM_TASKBAR_NOTIFICATION (WM_USER + 1)

0 commit comments

Comments
 (0)