[Lazarus] [patch] File Browser add-on
Graeme Geldenhuys
graemeg.lists at gmail.com
Thu Sep 18 13:21:43 CEST 2008
Op dinsdag 16-09-2008 om 21:16 uur [tijdzone +0200], schreef Pavel
Řezníček:
> On Lazarus v0.9.25 r16541 i386-win32-win32/win64, the LoadLibrary
> function fails on WinCE.
Did you use fpc 2.2.2?
> I tried to load libpq.dll and sqlite3.dll with no success.
sqlite3.dll works here as a charm. TSQLite3connection also works.
> 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.
Did you try any other software that uses this library on 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;
> begin
> LibHandle := Windows.LoadLibrary('mylibrary.dll')
> ShowMessage(IntToStr(LibHandle));
> LibHandle := Windows.LoadLibrary(ExtractFilePath(ParamStr(0)) +
> 'mylibrary.dll')
> ShowMessage(IntToStr(LibHandle));
> end;
>
> 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?
I woudn't be suprised if all files must be in the application's
directory.
Joost.
More information about the Lazarus
mailing list