> > You might get a clue if you print last windows error. > > (sysutils.getlastoserror) after the 2nd loadlib > > The error code is: 193 0x00C1 N/A %1 is not a valid Win32 application. > > But that doesn?t make sense. See if FPC has some directive for setting the DLL baseaddress and set it, and see if that matters.