summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-20 13:53:39 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-20 13:53:39 (GMT)
commit865ea5e678412f23106c8374c3113169e35439f9 (patch)
treeaf78b8a6b2ec5871ea8f2305e3ae5c62f102753a /win
parent775e9aac009c6cd4a3cddbf67de9feac451f5662 (diff)
downloadtcl-865ea5e678412f23106c8374c3113169e35439f9.zip
tcl-865ea5e678412f23106c8374c3113169e35439f9.tar.gz
tcl-865ea5e678412f23106c8374c3113169e35439f9.tar.bz2
More Win32 API impovals.
Diffstat (limited to 'win')
-rw-r--r--win/tclWinConsole.c4
-rw-r--r--win/tclWinDde.c16
-rw-r--r--win/tclWinFile.c2
-rw-r--r--win/tclWinPipe.c2
-rw-r--r--win/tclWinReg.c2
-rw-r--r--win/tclWinSock.c16
6 files changed, 21 insertions, 21 deletions
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c
index e7b87a7..dbec52b 100644
--- a/win/tclWinConsole.c
+++ b/win/tclWinConsole.c
@@ -229,7 +229,7 @@ ReadConsoleBytes(
* will run and take whatever action it deems appropriate.
*/
do {
- result = ReadConsole(hConsole, lpBuffer, nbytes / sizeof(WCHAR), &ntchars,
+ result = ReadConsoleW(hConsole, lpBuffer, nbytes / sizeof(WCHAR), &ntchars,
NULL);
} while (result && ntchars == 0 && GetLastError() == ERROR_OPERATION_ABORTED);
if (nbytesread != NULL) {
@@ -248,7 +248,7 @@ WriteConsoleBytes(
DWORD ntchars;
BOOL result;
- result = WriteConsole(hConsole, lpBuffer, nbytes / sizeof(WCHAR), &ntchars,
+ result = WriteConsoleW(hConsole, lpBuffer, nbytes / sizeof(WCHAR), &ntchars,
NULL);
if (nbyteswritten != NULL) {
*nbyteswritten = ntchars * sizeof(WCHAR);
diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index 1eded82..6fa9cc2 100644
--- a/win/tclWinDde.c
+++ b/win/tclWinDde.c
@@ -251,7 +251,7 @@ Initialize(void)
if (ddeInstance == 0) {
Tcl_MutexLock(&ddeMutex);
if (ddeInstance == 0) {
- if (DdeInitialize(&ddeInstance, (PFNCALLBACK) DdeServerProc,
+ if (DdeInitializeW(&ddeInstance, (PFNCALLBACK) DdeServerProc,
CBF_SKIP_REGISTRATIONS | CBF_SKIP_UNREGISTRATIONS
| CBF_FAIL_POKES, 0) != DMLERR_NO_ERROR) {
ddeInstance = 0;
@@ -1107,16 +1107,16 @@ DdeClientWindowProc(
(DdeEnumServices *) lpcs->lpCreateParams;
#ifdef _WIN64
- SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) es);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR) es);
#else
- SetWindowLong(hwnd, GWL_USERDATA, (LONG) es);
+ SetWindowLongW(hwnd, GWL_USERDATA, (LONG) es);
#endif
return (LRESULT) 0L;
}
case WM_DDE_ACK:
return DdeServicesOnAck(hwnd, wParam, lParam);
default:
- return DefWindowProc(hwnd, uMsg, wParam, lParam);
+ return DefWindowProcW(hwnd, uMsg, wParam, lParam);
}
}
@@ -1134,9 +1134,9 @@ DdeServicesOnAck(
Tcl_DString dString;
#ifdef _WIN64
- es = (DdeEnumServices *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ es = (DdeEnumServices *) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
#else
- es = (DdeEnumServices *) GetWindowLong(hwnd, GWL_USERDATA);
+ es = (DdeEnumServices *) GetWindowLongW(hwnd, GWL_USERDATA);
#endif
if (((es->service == (ATOM)0) || (es->service == service))
@@ -1179,7 +1179,7 @@ DdeServicesOnAck(
* Tell the server we are no longer interested.
*/
- PostMessage(hwndRemote, WM_DDE_TERMINATE, (WPARAM)hwnd, 0L);
+ PostMessageW(hwndRemote, WM_DDE_TERMINATE, (WPARAM)hwnd, 0L);
return 0L;
}
@@ -1191,7 +1191,7 @@ DdeEnumWindowsCallback(
DWORD_PTR dwResult = 0;
DdeEnumServices *es = (DdeEnumServices *) lParam;
- SendMessageTimeout(hwndTarget, WM_DDE_INITIATE, (WPARAM)es->hwnd,
+ SendMessageTimeoutW(hwndTarget, WM_DDE_INITIATE, (WPARAM)es->hwnd,
MAKELONG(es->service, es->topic), SMTO_ABORTIFHUNG, 1000,
&dwResult);
return TRUE;
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 3259ff7..0682d74 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -2207,7 +2207,7 @@ NativeDev(
p = strchr(p + 1, '\\');
if (p == NULL) {
/*
- * Add terminating backslash to fullpath or GetVolumeInformation()
+ * Add terminating backslash to fullpath or GetVolumeInformationW()
* won't work.
*/
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index ed4bc22..26f0b3e 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -1207,7 +1207,7 @@ HasConsole(void)
{
HANDLE handle;
- handle = CreateFileA("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE,
+ handle = CreateFileW(L"CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (handle != INVALID_HANDLE_VALUE) {
diff --git a/win/tclWinReg.c b/win/tclWinReg.c
index b715209..068e5d7 100644
--- a/win/tclWinReg.c
+++ b/win/tclWinReg.c
@@ -1449,7 +1449,7 @@ BroadcastValue(
* Use the ignore the result.
*/
- result = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE,
+ result = SendMessageTimeoutW(HWND_BROADCAST, WM_SETTINGCHANGE,
(WPARAM) 0, (LPARAM) wstr, SMTO_ABORTIFHUNG, (UINT) timeout, &sendResult);
Tcl_DStringFree(&ds);
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 7a5c282..bb6c690 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -310,7 +310,7 @@ static ProcessGlobalValue hostName =
*/
#define SendSelectMessage(tsdPtr, message, payload) \
- SendMessage((tsdPtr)->hwnd, SOCKET_SELECT, \
+ SendMessageW((tsdPtr)->hwnd, SOCKET_SELECT, \
(WPARAM) (message), (LPARAM) (payload))
@@ -501,7 +501,7 @@ TclpFinalizeSockets(void)
if (tsdPtr->socketThread != NULL) {
if (tsdPtr->hwnd != NULL) {
- PostMessage(tsdPtr->hwnd, SOCKET_TERMINATE, 0, 0);
+ PostMessageW(tsdPtr->hwnd, SOCKET_TERMINATE, 0, 0);
/*
* Wait for the thread to exit. This ensures that we are
@@ -2534,11 +2534,11 @@ InitSockets(void)
tsdPtr->socketList = NULL;
tsdPtr->hwnd = NULL;
tsdPtr->threadId = Tcl_GetCurrentThread();
- tsdPtr->readyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ tsdPtr->readyEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
if (tsdPtr->readyEvent == NULL) {
goto initFailure;
}
- tsdPtr->socketListLock = CreateEvent(NULL, FALSE, TRUE, NULL);
+ tsdPtr->socketListLock = CreateEventW(NULL, FALSE, TRUE, NULL);
if (tsdPtr->socketListLock == NULL) {
goto initFailure;
}
@@ -3205,7 +3205,7 @@ SocketThread(
/*
* Process all messages on the socket window until WM_QUIT. This threads
* exits only when instructed to do so by the call to
- * PostMessage(SOCKET_TERMINATE) in TclpFinalizeSockets().
+ * PostMessageW(SOCKET_TERMINATE) in TclpFinalizeSockets().
*/
while (GetMessageW(&msg, NULL, 0, 0) > 0) {
@@ -3256,7 +3256,7 @@ SocketProc(
#ifdef _WIN64
GetWindowLongPtrW(hwnd, GWLP_USERDATA);
#else
- GetWindowLong(hwnd, GWL_USERDATA);
+ GetWindowLongW(hwnd, GWL_USERDATA);
#endif
switch (message) {
@@ -3271,10 +3271,10 @@ SocketProc(
*/
#ifdef _WIN64
- SetWindowLongPtr(hwnd, GWLP_USERDATA,
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA,
(LONG_PTR) ((LPCREATESTRUCT)lParam)->lpCreateParams);
#else
- SetWindowLong(hwnd, GWL_USERDATA,
+ SetWindowLongW(hwnd, GWL_USERDATA,
(LONG) ((LPCREATESTRUCT)lParam)->lpCreateParams);
#endif
break;