Returning strings from DLLs written in Delphi

Martin v. Loewis martin at v.loewis.de
Fri Mar 8 04:09:52 EST 2002


tkeon0 at netscape.net (Trevor Keon) writes:

> I have been trying to get a DLL written in Delphi 5 to return a string
> to Python 2.1.2 (i use windll to access the dll), and all I get is a
> bunch of numbers(the numbers stay the same too).
[...]
> Does anyone have any ideas how to get around this problem?  

I recommend to not use windll, but to write an explicit wrapper
instead (in C or Pascal, at your option).  To my knowledge, PASCAL
strings start with a length indication. I doubt that this is a data
type supported by windll.

Regards,
Martin



More information about the Python-list mailing list