summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/tclWinDde.c18
-rw-r--r--win/tclWinReg.c8
2 files changed, 17 insertions, 9 deletions
diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index 9084dc0..9562a06 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.20 2004/03/19 18:33:52 kennykb Exp $
+ * RCS: @(#) $Id: tclWinDde.c,v 1.21 2004/09/01 17:40:39 hobbs Exp $
*/
#include "tclInt.h"
@@ -377,7 +377,7 @@ DdeSetServerName(
riPtr = (RegisteredInterp *) ckalloc(sizeof(RegisteredInterp));
riPtr->interp = interp;
- riPtr->name = ckalloc(strlen(actualName) + 1);
+ riPtr->name = ckalloc((unsigned int) strlen(actualName) + 1);
riPtr->nextPtr = tsdPtr->interpListPtr;
riPtr->handlerPtr = handlerPtr;
if (riPtr->handlerPtr != NULL)
@@ -961,14 +961,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:
@@ -988,8 +992,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)) {
@@ -1021,7 +1029,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 61be3d2..d113f87 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.28 2004/04/06 22:25:58 dgp Exp $
+ * RCS: @(#) $Id: tclWinReg.c,v 1.29 2004/09/01 17:40:39 hobbs Exp $
*/
#include "tclInt.h"
@@ -1408,7 +1408,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;
@@ -1442,8 +1442,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;