<p>Am 12.06.2012 15:20 schrieb "kyan" <<a href="mailto:alfasud.ti@gmail.com">alfasud.ti@gmail.com</a>>:<br>
><br>
> OK, I apologize. It seems that the problem lies elsewhere. The fact<br>
> that library initialization seems to be deferred until you do a<br>
> GetProcAddress() confused me. </p>
<p>It might't be that Windows (or CE only) initalizes a library only if you use GetProcAddress at least once... I have not tested that, but it might be an idea. If that is the case we can not influence that.</p>
<p>> The problem is that function<br>
> GetModuleName() is stubbed out in WinCE (and Linux):<br>
><br>
> unit SysUtils.inc;<br>
><br>
> function GetModuleName(Module: HMODULE): string;<br>
> begin<br>
> {$ifdef MSWINDOWS}<br>
>  SetLength(Result,MAX_PATH);<br>
>  SetLength(Result,GetModuleFileName(Module, Pchar(Result),Length(Result)));<br>
> {$ELSE}<br>
>  Result:='';<br>
> {$ENDIF}<br>
> end;<br>
><br>
> The function GetModuleFileName() exists (although it is unicode) in<br>
> WinCE: <a href="http://msdn.microsoft.com/en-us/library/ms908441.aspx">http://msdn.microsoft.com/en-us/library/ms908441.aspx</a><br>
><br>
> And from what I've found in the web a Linux implementation is possible<br>
> using dladdr().</p>
<p>If you want you can create a bug report. WinCE might likely be solved then, but I can't comment on Linux or other *nix systems.</p>
<p>Regards,<br>
Sven</p>