summaryrefslogtreecommitdiffstats
path: root/win/tkWinX.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-11-07 14:15:04 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-11-07 14:15:04 (GMT)
commitf9626b8791b204e2abc39cfc211befbaa74d7202 (patch)
tree642e999aa3f8c172ac8b66ad3d0d43b485bda9bb /win/tkWinX.c
parentbdf82ef94f1819825be63c93d5966d57a1449c95 (diff)
downloadtk-f9626b8791b204e2abc39cfc211befbaa74d7202.zip
tk-f9626b8791b204e2abc39cfc211befbaa74d7202.tar.gz
tk-f9626b8791b204e2abc39cfc211befbaa74d7202.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.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c
index b2424ce..098fc6d 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,