diff options
author | hobbs <hobbs> | 2004-09-01 17:40:39 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2004-09-01 17:40:39 (GMT) |
commit | 2a6660d57de536e5da57cbf735bec60b9013bdc8 (patch) | |
tree | 66482e59f290fb3e3be48f2942acca8ee5fedc99 /win/tclWinDde.c | |
parent | 16b932f7c4cf8850d44cd00d7759e513af539903 (diff) | |
download | tcl-2a6660d57de536e5da57cbf735bec60b9013bdc8.zip tcl-2a6660d57de536e5da57cbf735bec60b9013bdc8.tar.gz tcl-2a6660d57de536e5da57cbf735bec60b9013bdc8.tar.bz2 |
WIN64 corrections
Diffstat (limited to 'win/tclWinDde.c')
-rw-r--r-- | win/tclWinDde.c | 18 |
1 files changed, 13 insertions, 5 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, |