diff options
author | Guido van Rossum <guido@python.org> | 1997-08-13 19:53:11 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-08-13 19:53:11 (GMT) |
commit | 0e6ae93894b1383616d436dcfde2ebc1ad05ea4c (patch) | |
tree | 2d1e4f4428fe0d249a631875f62bedbc8d0bbeb8 /PC/import_nt.c | |
parent | 5137ea9e27f9e34a83c23e533451cebc4705dbba (diff) | |
download | cpython-0e6ae93894b1383616d436dcfde2ebc1ad05ea4c.zip cpython-0e6ae93894b1383616d436dcfde2ebc1ad05ea4c.tar.gz cpython-0e6ae93894b1383616d436dcfde2ebc1ad05ea4c.tar.bz2 |
Moved PyWin_IsWin32s() here.
Diffstat (limited to 'PC/import_nt.c')
-rw-r--r-- | PC/import_nt.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/PC/import_nt.c b/PC/import_nt.c index 022b9e5..1eef4d2 100644 --- a/PC/import_nt.c +++ b/PC/import_nt.c @@ -11,7 +11,21 @@ #include <windows.h> #include "importdl.h" -extern BOOL PyWin_IsWin32s(); +/* Return whether this is Win32s, i.e., Win32 API on Win 3.1(1). + This function is exported! */ + +BOOL PyWin_IsWin32s() +{ + static BOOL bIsWin32s = -1; /* flag as "not yet looked" */ + + if (bIsWin32s == -1) { + OSVERSIONINFO ver; + ver.dwOSVersionInfoSize = sizeof(ver); + GetVersionEx(&ver); + bIsWin32s = ver.dwPlatformId == VER_PLATFORM_WIN32s; + } + return bIsWin32s; +} FILE *PyWin_FindRegisteredModule( const char *moduleName, struct filedescr **ppFileDesc, char *pathBuf, int pathLen) { |