[python-win32] Sending raw bytes with DDE server
Tim Roberts
timr at probo.com
Mon Oct 28 18:56:15 CET 2013
Dave Cook wrote:
> I have to interface some Python code with some ancient DDE clients.
> One of the Requests requires a struct. I tried using the struct.pack
> from the struct module, but data gets cut off at the first inevitable
> NULL byte.
You're sure the client wants binary, and not some ASCII encoding of the
binary? That was a common strategy in the days when DDE was popular
(that is, during the reign of the 80386).
Your assessment is correct. The PyWin32 DDE support is string only. If
you really need binary, then you will have to write a DLL helper. The
ctypes module might help.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list