Loadlibrary on Win64 lazarus / 13-General ---------------------------------------------------------------------- Giel · 2009-10-26 11:58 Hello, I'm trying to use a dll via LoadLibrary etc., but I get "Control-C hit" errors shortly after doing something with the dll. I've read that there was a problem with FPC 2.2.4 because TLibhandle was 4 bytes whereas it should be 8. So i installed the 2.3.1 based Lazarus snapshot. The source now shows that TLibHandle = system.THandle, but the problem still persists. It it me, or does using DLLs dynamically still not work for x64 Windows? Can anyone confirm that the LoadLibrary scenario now works on Win64? Giel ---------------------------------------------------------------------- alter · 2009-10-26 16:13 FPC 2.2.2 and Lazarus 0.9.26.2. That was the last time I have tried this and it worked. ---------------------------------------------------------------------- Giel · 2009-10-26 22:54 Quote from: alter on October 26, 2009, 05:13:18 pmFPC 2.2.2 and Lazarus 0.9.26.2. That was the last time I have tried this and it worked. Just tried that one, but no luck. The 2.2.2/2.2.4 versions give me a Runerror(4017) as soon as I call a function exported by the dll. 2.3.1 at least actually calls the dll function, and I can see it does something, but then there's the "Control-C hit" error. Just to be sure: you did have a 64 bit program, did you? I have no problems with 32 bits. Giel ---------------------------------------------------------------------- alter · 2009-10-27 11:22 Uses, I was using 64bit compilations of my soft. Can you show sample declaration of function in dll you are using? ---------------------------------------------------------------------- Giel · 2009-10-28 15:36 I'm going to try this with a Windows dll, in order to rule out any issues with the third-party dll I'm using. I'll report back. ---------------------------------------------------------------------- Giel · 2011-02-22 19:07 Quote from: Giel on October 28, 2009, 04:36:42 pmI'm going to try this with a Windows dll, in order to rule out any issues with the third- party dll I'm using. I'll report back. For the record: it appears I was running into http://bugs.freepascal.org/view.php?id=17280 here. Giel