[python-win32] Encoding bytes in clipboard format (was: Sending raw bytes with DDE server)
Dave Cook
daverz at gmail.com
Tue Oct 29 00:09:50 CET 2013
> On Mon, Oct 28, 2013 at 10:56 AM, Tim Roberts <timr at probo.com> wrote:
>
>>
>> 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.
>>
>
So it looks like I need to encode my data as CF_TEXT (clipboard format).
Any hints on how I can encode a byte string as CF_TEXT? Not for use on the
clipboard, but for sending as the return value for a DDE request.
Thanks,
Dave Cook
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20131028/2b0c2985/attachment.html>
More information about the python-win32
mailing list