From e476f9421288aedee52a65ec813c7683ff0ccf5f Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sat, 21 May 2005 13:19:27 +0000 Subject: Move _WIN32_WINNT definition from command line to e_os.h. The change is inspired by VC6 failure report. In addition abstain from taking screen snapshots when running in NT service context. --- e_os.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'e_os.h') diff --git a/e_os.h b/e_os.h index 3ff9f3cd1c..cf76632b1e 100644 --- a/e_os.h +++ b/e_os.h @@ -235,6 +235,23 @@ extern "C" { # define NO_DIRENT # ifdef WINDOWS +# ifndef _WIN32_WINNT + /* + * Defining _WIN32_WINNT here in e_os.h implies certain "discipline." + * Most notably we ought to check for availability of each specific + * routine with GetProcAddress() and/or quard NT-specific calls with + * GetVersion() < 0x80000000. One can argue that in latter "or" case + * we ought to /DELAYLOAD some .DLLs in order to protect ourselves + * against run-time link errors. This doesn't seem to be necessary, + * because it turned out that already Windows 95, first non-NT Win32 + * implementation, is equipped with at least NT 3.51 stubs, dummy + * routines with same name, but which do nothing. Meaning that it's + * apparently appropriate to guard generic NT calls with GetVersion + * alone, while NT 4.0 and above calls ought to be additionally + * checked upon with GetProcAddress. + */ +# define _WIN32_WINNT 0x0400 +# endif # include # include # include -- cgit v1.2.3