diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-11-07 14:43:39 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-11-07 14:43:39 (GMT) |
commit | f0a49fb50d3f9081a6d15ab8a54ea7cfb81b50d8 (patch) | |
tree | c9fe9bd01413b9122cdecf28f7ef3b93af9e89be /win/tkWinX.c | |
parent | f58782e964943a3a977716bf65ee3b6cedafde06 (diff) | |
parent | f9626b8791b204e2abc39cfc211befbaa74d7202 (diff) | |
download | tk-f0a49fb50d3f9081a6d15ab8a54ea7cfb81b50d8.zip tk-f0a49fb50d3f9081a6d15ab8a54ea7cfb81b50d8.tar.gz tk-f0a49fb50d3f9081a6d15ab8a54ea7cfb81b50d8.tar.bz2 |
Add another few Xlib stubs for Win32. Cherry-picked from [http://www.androwish.org/index.html/info/862eb620a096fddc|AndroWish]. Thanks to Christian Werner.
Diffstat (limited to 'win/tkWinX.c')
-rw-r--r-- | win/tkWinX.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c index 2dc3b63..cfd64af 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -125,16 +125,13 @@ TkGetServerInfo( OSVERSIONINFOW os; if (!buffer[0]) { - HANDLE handle = LoadLibraryW(L"NTDLL"); + HANDLE handle = GetModuleHandle(TEXT("NTDLL")); int(__stdcall *getversion)(void *) = (int(__stdcall *)(void *))GetProcAddress(handle, "RtlGetVersion"); os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); if (!getversion || getversion(&os)) { GetVersionExW(&os); } - if (handle) { - FreeLibrary(handle); - } /* Write the first character last, preventing multi-thread issues. */ sprintf(buffer+1, "indows %d.%d %d %s", (int)os.dwMajorVersion, (int)os.dwMinorVersion, (int)os.dwBuildNumber, |