[Lazarus] Simple ipc server fatal error on start - 0xc000007b
Bo Berglund
bo.berglund at gmail.com
Fri Mar 31 18:38:46 CEST 2023
I am investigating the possibilities to use IPC between a Lazarus and a Delphi7
application running on Windows. I was discussing this on the Lazarus forum where
I got a tip to use SimpleIPC, which apparently is delivered with the Fpc
compiler itself.
The tip was given in this post:
https://forum.lazarus.freepascal.org/index.php/topic,62867.msg475663.html#msg475663
In that post is a link to a GitHub project which simplifies ipc usage by
creating a dll packaging everything needed so that the dll could be used from
other applications developed in other languages too. Sounds good to me.
Here is the GitHub project url:
https://github.com/z505/SimpleIPC-lib
So I downloaded this and using Lazarus 2.2.4 and Fpc 3.2.2 on Windows 10 x64 I
did this:
1) opened the dll project and compiled the dll itself.
2) Opened the demo-lazarus\ipcclient project and compiled it
3) Opened the demo-lazarus\ipcserver project and compiled it
So now I could start the ipcclient app and it shows its form with a button to
send data to the server. When I used it there was an error message about "not
finding the server". To be expected, since I had not started the server...
So I next tried to start the server app, but it immediately shows an error box
with the text:
-------------------
Application error
The application was unable to start correctly (0xc000007b).
Click OK to close the application.
[OK]
-------------------
I have tried various things like changing target for the dll and both
applications to win32 (I have the cross for Win32 installed), but the exact same
happens.
And I have no idea whatsoever on where to look for a reason for this to happen.
I have even put a breakpoint into the server code at the earliest point I could
find and started it from Lazarus, but get the same error dialog and no
breakpoint reached...
I tried reading https://wiki.freepascal.org/SimpleIPC but got no idea from that
either...
What to do now?
I am not clever enough to figure out if there is some error in the GitHub
project. Not used to windows communications at all.
What I want to do is to create an ipc link to a Delphi7 server app from a
Lazarus/fpc client app to use the D7 app to read a hardware device on command
and send the data to the Lazarus app.
It is not possible to compile the D7 app on Lazarus because there is a device
manufacturer's obj file involved and it is apparently of the wrong format for
Lazarus/Fpc to use. It can be linked to in Delphi7 but not in Lazarus/Fpc.
Hence the D7<=ipc=>Lazarus IPC communication...
I really do hope this can be fixed so I can get the ipc comm line to the D7
interfacing app working!
--
Bo Berglund
Developer in Sweden
More information about the lazarus
mailing list