Callback Python procedure from Delphi DLL

durumdara at durumdara at
Mon Jul 28 10:27:43 CEST 2008


I have a component, and a tool in Delphi.
I wanna call it from Python.

I can implement all things I need into a Delphi generated DLL.
It is ok, I can use this DLL from Python, but the DLL procedure needs a
callback procedure to return the partially output, and needs a python 
passed variable to check terminate/abort signal.

For example:
procedure ProcessFiles(InputFiles : string; CallBackProc:
????????????????????????); export;
    CallBackProc(ProcessedFiles, Percentage, NeedToAbort);
    if NeedToAbort then Exit;	

def CallBackProc(ProcessedFiles, Percentage, NeedToAbort):

But I don't know, how to call back this procedure, and how to pass

The other way is a ActiveX.
This time I don't load the DLL, I only construct the Delphi based Com
Object, and I start the process.

But in this way I also don't know how to implement the callback, because
the main code uses callback events, and I need to use too...

Thanks for every usable help!

More information about the Python-list mailing list