--- tclWinDde_ori.c	2008-10-15 00:43:29.000000000 +0200
+++ tclWinDde.c	2008-12-18 14:09:23.000000000 +0100
@@ -1158,7 +1158,13 @@
 	DDE_SERVERNAME_EXACT, DDE_SERVERNAME_HANDLER, DDE_SERVERNAME_LAST,
     };
     static const char *const ddeExecOptions[] = {
-	"-async", NULL
+	"-async", "-binary", NULL
+    };
+    enum DdeExecOptions {
+        DDE_EXEC_ASYNC, DDE_EXEC_BINARY
+    };
+    static const char *const ddePokeOptions[] = {
+	"-binary", NULL
     };
     static const char *const ddeReqOptions[] = {
 	"-binary", NULL
@@ -1238,27 +1244,43 @@
 	if (objc == 5) {
 	    firstArg = 2;
 	    break;
-	} else if (objc == 6) {
+	} else if (objc >= 6 && objc <= 7) {
+	    int argIndex;
+	    firstArg = objc - 3;
+	    for (i = 2; i < firstArg; i++) {
+		if (Tcl_GetIndexFromObj(NULL, objv[2], ddeExecOptions, "option",
+		    0, &argIndex) != TCL_OK) {
+		    return TCL_ERROR;
+		}
+		if (argIndex == DDE_EXEC_ASYNC) {
+		    async = 1;
+		} else {
+		    binary = 1;
+		}
+	    }
+	    break;
+	}
+	/* otherwise... */
+	Tcl_WrongNumArgs(interp, 2, objv,
+		"?-async? ?-binary? serviceName topicName value");
+	return TCL_ERROR;
+    case DDE_POKE:
+	if (objc == 6) {
+	    firstArg = 2;
+	    break;
+	} else if (objc == 7) {
 	    int dummy;
-	    if (Tcl_GetIndexFromObj(NULL, objv[2], ddeExecOptions, "option", 0,
+	    if (Tcl_GetIndexFromObj(NULL, objv[2], ddePokeOptions, "option", 0,
 		    &dummy) == TCL_OK) {
-		async = 1;
+		binary = 1;
 		firstArg = 3;
 		break;
 	    }
 	}
 	/* otherwise... */
 	Tcl_WrongNumArgs(interp, 2, objv,
-		"?-async? serviceName topicName value");
+		"serviceName ?-binary? topicName item value");
 	return TCL_ERROR;
-    case DDE_POKE:
-	if (objc != 6) {
-	    Tcl_WrongNumArgs(interp, 2, objv,
-		    "serviceName topicName item value");
-	    return TCL_ERROR;
-	}
-	firstArg = 2;
-	break;
     case DDE_REQUEST:
 	if (objc == 5) {
 	    firstArg = 2;
@@ -1345,8 +1367,13 @@
 
     case DDE_EXECUTE: {
 	int dataLength;
-	char *dataString = Tcl_GetStringFromObj(objv[firstArg + 2],
-		&dataLength);
+	char *dataString;
+	if (binary) {
+	    dataString = Tcl_GetByteArrayFromObj(objv[firstArg + 2],
+	    	&dataLength);
+	} else {
+	    dataString = Tcl_GetStringFromObj(objv[firstArg + 2], &dataLength);
+	}
 
 	if (dataLength == 0) {
 	    Tcl_SetObjResult(interp,
@@ -1444,7 +1471,11 @@
 	    result = TCL_ERROR;
 	    goto cleanup;
 	}
-	dataString = Tcl_GetStringFromObj(objv[firstArg + 3], &length);
+	if (binary) {
+	    dataString = Tcl_GetByteArrayFromObj(objv[firstArg + 3], &length);
+	} else {
+	    dataString = Tcl_GetStringFromObj(objv[firstArg + 3], &length);
+	}
 
 	hConv = DdeConnect(ddeInstance, ddeService, ddeTopic, NULL);
 	DdeFreeStringHandle(ddeInstance, ddeService);
