summaryrefslogtreecommitdiffstats
path: root/win/tclWinInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r--win/tclWinInit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 852e5f7..1669ede 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -17,7 +17,7 @@
#include <lmcons.h>
/*
- * GetUserName() is found in advapi32.dll
+ * GetUserNameW() is found in advapi32.dll
*/
#ifdef _MSC_VER
# pragma comment(lib, "advapi32.lib")
@@ -149,13 +149,13 @@ TclpInitPlatform(void)
* invoked.
*/
- TclWinInit(GetModuleHandle(NULL));
+ TclWinInit(GetModuleHandleW(NULL));
#endif
/*
* Fill available functions depending on windows version
*/
- handle = GetModuleHandle(L"KERNEL32");
+ handle = GetModuleHandleW(L"KERNEL32");
tclWinProcs.cancelSynchronousIo =
(BOOL (WINAPI *)(HANDLE)) GetProcAddress(handle,
"CancelSynchronousIo");
@@ -472,7 +472,7 @@ TclpGetUserName(
WCHAR szUserName[UNLEN+1];
DWORD cchUserNameLen = UNLEN;
- if (!GetUserName(szUserName, &cchUserNameLen)) {
+ if (!GetUserNameW(szUserName, &cchUserNameLen)) {
return NULL;
}
cchUserNameLen--;
@@ -517,7 +517,7 @@ TclpSetVariables(
TclGetProcessGlobalValue(&defaultLibraryDir), TCL_GLOBAL_ONLY);
if (!osInfoInitialized) {
- HMODULE handle = GetModuleHandle(L"NTDLL");
+ HMODULE handle = GetModuleHandleW(L"NTDLL");
int(__stdcall *getversion)(void *) =
(int(__stdcall *)(void *)) GetProcAddress(handle, "RtlGetVersion");
osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);