chris.cavalaria at free.fr
Mon Jun 28 01:06:25 CEST 2004
John J. Lee wrote:
> Jarek Zgoda <jzgoda at gazeta.usun.pl> writes:
>> Christopher T King <squirrel at WPI.EDU> pisze:
>> > I don't know anything about Delphi; it may use a different calling
>> > convention than C (unlikely). If that's the case, however, you're out
>> > of luck unless you can find a Delphi-C or Delphi-Python interface
>> > module.
>> Register is default call convention for libraries written in Delphi, but
>> one may use any other at will.
> A bit of a Delphic utterance...
> Googling, it seems 'Register' is what MSVC calls __fastcall.
> Not sure how you tell which Delphi functions obey which calling
> convention, but (in the absence of a more polished method) I think I'd
> attempt to find that out, then write a thin wrapper of the Delphi
> interface in C, with explicit calling convention declarations
> (eg. __fastcall), then wrap *that* with SWIG.
Use cdecl in Delphi so declare a function with C calling convention. No need
to create a wraper in C to do that.
procedure DoSomething; cdecl;
More information about the Python-list