Hi!
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;
begin
....
CallBackProc(ProcessedFiles, Percentage, NeedToAbort);
if NeedToAbort then Exit;
....
end;
def CallBackProc(ProcessedFiles, Percentage, NeedToAbort):
...
But I don't know, how to call back this procedure, and how to pass
variables.
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!
dd 1 2985 du*******@gmail.com wrote:
Hi!
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;
begin
....
CallBackProc(ProcessedFiles, Percentage, NeedToAbort);
if NeedToAbort then Exit;
....
end;
def CallBackProc(ProcessedFiles, Percentage, NeedToAbort):
...
But I don't know, how to call back this procedure, and how to pass
variables.
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!
ctypes allows to create callbacks. See the module-docs.
Diez This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Edilmar |
last post by:
Hi,
First of all, I'm new in Python...
I have worked with manu langs and IDEs, like Delphi, VB, JBuilder, Eclipse,
Borland C++, Perl, etc...
Then, today I think IDEs like Delphi have a...
|
by: AMD |
last post by:
Hi,
I need to write a Win32 DLL and I would like to use Python instead of
VB, C++ or Delphi. Is this possible?
Thank you,
Andre M. Descombes
|
by: Tom |
last post by:
delphi 7
python 2.3
win98
Python for Delphi V3.25
In Delphi:
1 Create a new Form ;
2 Drop a TMemo(Memo1) to contain python code;
3 Drop a TPythonInputOutput (PythonInputOutput1) ;
|
by: Francois De Serres |
last post by:
Hiho,
could somebody please enlighten me about the mechanics of C callbacks to
Python? My domain is more specifically callbacks from the win32 API, but
I'm not sure that's where the problem...
|
by: Jon E. Scott |
last post by:
I've got a project where I need to create a C# project and a Delphi DLL, in
which the DLL has a callback function to send statuses back to the C#
application. It seems pretty straightforward in a...
|
by: sajin |
last post by:
Hi All..
We are using VB .Net 2005 for implementing an API. API needs to
generate events. For this client wants us to use Windows Callback
(delegate implementation). The intention of using...
|
by: Larry Bates |
last post by:
I have a Python COM object working. I want to pass to it
a Delphi callback function (showing progress) that I can
call periodically. I've Googled until I'm cross-eyed and
I'm getting nowhere. ...
|
by: Tim Spens |
last post by:
--- On Fri, 6/27/08, Tim Spens <t_spens@yahoo.comwrote:
I think I know where the problem is but I'm unsure how to fix it. When I call Register_Handler(...) from python via...
|
by: Dotan Cohen |
last post by:
I often see mention of SMBs that either want to upgrade their Windows
installations, or move to Linux, but cannot because of inhouse VB
apps. Are there any Python experts who I can reference them...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |