Sam Trenholme's webpage
This article was posted to the Usenet group alt.hackers in 1995; any technical information is probably outdated.

Windows DDE hack

Article: 8838 of alt.hackers
From: (Warren Young)
Newsgroups: alt.hackers
Subject: Windows DDE hack
Date: Thu, 12 Oct 1995 05:43:52 GMT
Organization: Kennedy and Associates
Lines: 40
Message-ID: 45ia1u$
X-Newsreader: Forte Free Agent 1.0.82
Status: RO

First, someone else's hack: Go look at
Good stuff.

Next, my ObHack:

Windows' API has an excuse for interprocess communication called DDE.
Aside from being overly complex (it would be easier to open a TCP/IP
link to localhost through Winsock than to use DDE), it can only send
strings.  Or rather, you have to send messages as Windows "atoms",
which are null-terminated entities.  So, if you want to send binary
data to another program, tough....if you're one to give up easily,
that is B-).

Well, I naturally needed to send binary data between two programs, and
the data was likely to contain nulls.  The easy way out would have
been to sprintf() the data to a string and then sscanf() it on the
other end, but that was inefficient.  And easy.

So, I reasoned, how do you send binary data over ASCII links?
uuencode!  So, I wrote a quick uuencode variant and sent the data that

Next hack: Write a C++ wrapper class for DDE that makes it as easy to
use as the aforementioned TCP/IP connection.  Naturally, it will
support automatic uu{en,de}coding.

For what it's worth, I've switched from WinVN to Free Agent, and found
out that you can't post here from Free Agent using the trick I used
with WinVN.  Thanks to another hacker's message here for cluing me
about the method.  I like the WinVN method better, though -- I think
it has more hack value.


GCS/TW: -d+(---) H- s+:+ g+ p2 au a- w+>++ v-(?) C++$ UL++(V$) P+>+++
    L+>++ 3 E>+++ N+>++ K+ w++>+++ M-(+) V-- -po+ Y+ t+ !5 j+ R+ G?
    tv b+++(++) D+(++) B-- e*(+) u*>** h+ f r-- n---- !y

Back to index