diff options
author | hobbs <hobbs> | 2004-09-01 17:26:04 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2004-09-01 17:26:04 (GMT) |
commit | 3f4f8a12933888bb662d4f08a87785785d8ffdaf (patch) | |
tree | 9f3df7cef9afd0d37eba2a69abb350ef1804c686 | |
parent | 54f15bb144abf1e98db0a7bf90f741a93b41eff4 (diff) | |
download | tcl-3f4f8a12933888bb662d4f08a87785785d8ffdaf.zip tcl-3f4f8a12933888bb662d4f08a87785785d8ffdaf.tar.gz tcl-3f4f8a12933888bb662d4f08a87785785d8ffdaf.tar.bz2 |
WIN64 corrections
-rw-r--r-- | win/tclWinDde.c | 18 | ||||
-rw-r--r-- | win/tclWinReg.c | 8 |
2 files changed, 17 insertions, 9 deletions
diff --git a/win/tclWinDde.c b/win/tclWinDde.c index ac8e3b2..c00f697 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.13.2.3 2004/07/23 00:24:45 dgp Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.13.2.4 2004/09/01 17:26:06 hobbs Exp $ */ #include "tclPort.h" @@ -297,7 +297,7 @@ DdeSetServerName( riPtr = (RegisteredInterp *) ckalloc(sizeof(RegisteredInterp)); riPtr->interp = interp; - riPtr->name = ckalloc(strlen(name) + 1); + riPtr->name = ckalloc((unsigned int) strlen(name) + 1); riPtr->nextPtr = tsdPtr->interpListPtr; tsdPtr->interpListPtr = riPtr; strcpy(riPtr->name, name); @@ -815,14 +815,18 @@ DdeCreateClient(ddeEnumServices *es) LRESULT CALLBACK DdeClientWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - LONG lr = 0L; + LRESULT lr = 0L; switch (uMsg) { case WM_CREATE: { LPCREATESTRUCT lpcs = (LPCREATESTRUCT)lParam; ddeEnumServices *es; es = (ddeEnumServices*)lpcs->lpCreateParams; +#ifdef _WIN64 + SetWindowLongPtr(hwnd, GWLP_USERDATA, (long)es); +#else SetWindowLong(hwnd, GWL_USERDATA, (long)es); +#endif break; } case WM_DDE_ACK: @@ -842,8 +846,12 @@ DdeServicesOnAck(HWND hwnd, WPARAM wParam, LPARAM lParam) ATOM topic = (ATOM)HIWORD(lParam); ddeEnumServices *es; TCHAR sz[255]; - + +#ifdef _WIN64 + es = (ddeEnumServices *)GetWindowLongPtr(hwnd, GWLP_USERDATA); +#else es = (ddeEnumServices *)GetWindowLong(hwnd, GWL_USERDATA); +#endif if ((es->service == (ATOM)NULL || es->service == service) && (es->topic == (ATOM)NULL || es->topic == topic)) { @@ -875,7 +883,7 @@ DdeServicesOnAck(HWND hwnd, WPARAM wParam, LPARAM lParam) static BOOL CALLBACK DdeEnumWindowsCallback(HWND hwndTarget, LPARAM lParam) { - DWORD dwResult = 0; + LRESULT dwResult = 0; ddeEnumServices *es = (ddeEnumServices *)lParam; SendMessageTimeout(hwndTarget, WM_DDE_INITIATE, (WPARAM)es->hwnd, diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 424cb44..0f02db0 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.21.2.3 2003/11/10 22:42:07 dgp Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.21.2.4 2004/09/01 17:26:04 hobbs Exp $ */ #include <tclPort.h> @@ -1328,7 +1328,7 @@ BroadcastValue( int objc, /* Number of arguments. */ Tcl_Obj * CONST objv[]) /* Argument values. */ { - DWORD result, sendResult; + LRESULT result, sendResult; UINT timeout = 3000; int len; char *str; @@ -1362,8 +1362,8 @@ BroadcastValue( (WPARAM) 0, (LPARAM) str, SMTO_ABORTIFHUNG, timeout, &sendResult); objPtr = Tcl_NewObj(); - Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewIntObj((int) result)); - Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewIntObj((int) sendResult)); + Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewLongObj((long) result)); + Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewLongObj((long) sendResult)); Tcl_SetObjResult(interp, objPtr); return TCL_OK; |