[Lazarus] TMS component for lazarus released

Michael Van Canneyt michael at freepascal.org
Wed Sep 17 11:29:13 CEST 2008

Dear developers,

On Lazarus v0.9.25 r16541 i386-win32-win32/win64, the LoadLibrary 
function fails on WinCE.

I tried to load libpq.dll and sqlite3.dll with no success.

I have the ARM/WinCE libraries in the same directory as my executable 
(even in the \gdb folder). All accompanying libraries, *.dll and *.lib, 
for libpq.dll I have also there.

I tried to load the libraries myself using a full absolute path (e. g., 
ExtractFilePath(ParamStr(0)) + 'libpq.dll').

You can test it on the PQConnection component (try the .Connect 
property). Of course you should have the libpq.dll file for WinCE.

An alternative way is just to load some library you find on your WinCE 
system, let's say (untested code):

procedure Form1.Button1Click(Sender: TObject);
var LibHandle: HInst;
    LibHandle := Windows.LoadLibrary('mylibrary.dll')
    LibHandle := Windows.LoadLibrary(ExtractFilePath(ParamStr(0)) + 

That's it. If you have the same bug you'll get both handles of zero 
value (meaning the loading wasn't successful).

I wonder why just a simple thing as calling an API function would fail. 
Maybe because the core library from that the LoadLibrary function is 
imported also fails to load??

Any clue how to get it working?

Pavel Řezníček

More information about the Lazarus mailing list