importing dlls with python
Trevor Keon
tkeon0 at netscape.net
Tue Feb 19 23:29:07 EST 2002
Hi, I am new to Python, and was wondering if it was possible to import
dlls written in Delphi 5? I have tried a number of methods to make it
work, and I either get:
An illegal operation in windows,
or:
dynamic module does not define init function (initxxx),
where xxx is the dll name. Now in the dll I have added a initxxx
function that returns an int, and have also tried returning a boolean
(also tried using a procedure, same result). When I export the
initxxx function I get the illegal operation. For those who are
familiar with Delphi:
function initxxx: Integer; StdCall;
export;
...
function initxxx: Integer;
begin
...
end;
And in the project file:
export
initxxx;
If I do not have the export in the project file then I get the
second error (no init function). Can anyone help me here? Or does
anyone know another script language that can call dlls easily? I have
already looked at Tcl and Perl, but none of them seem feasible.
Thanks in advance,
Trevor
More information about the Python-list
mailing list