Windows DLL file loading does not work

Hello,
I have trouble to load dll files into prolog - all tries fail.
maybe someone of you find the mistake.
I used MingW64 for the C part, and Delphi 7 32-bit for the pascal part.
I always get 0 on loading.

Here is the trouble source code:
source

Can you combine 64 bit and 32 bit code in one process? One never knows, but I always thought this was not possible. Next, I see PL_get_string() which AFAIK doesn’t exist, so you should get a compiler warning as well as a runtime error. Also PL_succeed() is not a function. I consider it a bit old school and always use return TRUE (or FALSE). First step should be to compile with -Wall and make sure there are no warnings. Next is the 32/64 bit issue. I try to minimize my knowledge about Windows :slight_smile:

I check against all:

  • I have swipl 9.0.4 for x64-win64
  • I compile the C++ source with mingw64 bit (linking is successfully)
  • I created a 32-Bit DLL with delphi 7
    so, the loading 32bit dll from 64dll should work
    but i fail