diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-02 09:54:22 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-02 09:54:22 (GMT) |
commit | 3546e128c0c379f71d6fdf6678ad19cd9d0a0265 (patch) | |
tree | 2f7b0a919cbbf235da00b4db9c4de19eb5aed90c /win/tclWinDde.c | |
parent | e557e3df44d60bf5754cbc2e8a1a1225322dd5dd (diff) | |
download | tcl-3546e128c0c379f71d6fdf6678ad19cd9d0a0265.zip tcl-3546e128c0c379f71d6fdf6678ad19cd9d0a0265.tar.gz tcl-3546e128c0c379f71d6fdf6678ad19cd9d0a0265.tar.bz2 |
Fix Bug #3545367: DDE test failures
It turns out that "dde poke" had the same bug, unfortunately we cannot make a test-case for that.
Also modified more test-cases to use unicode variable names, so we can more reliably detect this
Diffstat (limited to 'win/tclWinDde.c')
-rw-r--r-- | win/tclWinDde.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/win/tclWinDde.c b/win/tclWinDde.c index da583da..1cd6c46 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -1483,8 +1483,13 @@ DdeObjCmd( break; } case DDE_REQUEST: { - const char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], +#ifdef UNICODE + const TCHAR *itemString = (TCHAR *) Tcl_GetUnicodeFromObj(objv[firstArg + 2], + &length); +#else + const TCHAR *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); +#endif if (length == 0) { Tcl_SetObjResult(interp, @@ -1503,7 +1508,7 @@ DdeObjCmd( } else { Tcl_Obj *returnObjPtr; ddeItem = DdeCreateStringHandle(ddeInstance, (void *) itemString, - CP_WINANSI); + CP_WINUNICODE); if (ddeItem != NULL) { ddeData = DdeClientTransaction(NULL, 0, hConv, ddeItem, CF_TEXT, XTYP_REQUEST, 5000, NULL); @@ -1537,8 +1542,13 @@ DdeObjCmd( break; } case DDE_POKE: { - const char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], +#ifdef UNICODE + const TCHAR *itemString = (TCHAR *) Tcl_GetUnicodeFromObj(objv[firstArg + 2], + &length); +#else + const TCHAR *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); +#endif BYTE *dataString; if (length == 0) { |