opensubscriber
   Find in this group all groups
 
Unknown more information…

f : fpc-pascal@lists.freepascal.org 13 June 2012 • 12:27AM -0400

Re: [fpc-pascal] Unit initialization in dll initialization for arm/WinCE
by Tomas Hajny

REPLY TO AUTHOR
 
REPLY TO GROUP




On Tue, June 12, 2012 18:04, Sven Barth wrote:
> Am 12.06.2012 15:20 schrieb "kyan" <alfasud.ti@gmai...>:
.
.
>> The problem is that function
>> GetModuleName() is stubbed out in WinCE (and Linux):
>>
>> unit SysUtils.inc;
>>
>> function GetModuleName(Module: HMODULE): string;
>> begin
>> {$ifdef MSWINDOWS}
>>  SetLength(Result,MAX_PATH);
>>  SetLength(Result,GetModuleFileName(Module,
> Pchar(Result),Length(Result)));
>> {$ELSE}
>>  Result:='';
>> {$ENDIF}
>> end;
>>
>> The function GetModuleFileName() exists (although it is unicode) in
>> WinCE: http://msdn.microsoft.com/en-us/library/ms908441.aspx
>>
>> And from what I've found in the web a Linux implementation is possible
>> using dladdr().
>
> 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.

In any case, it's wrong that the implementation is placed in the platform
independent include file instead of the respective sysutils.pp files. :-(

Tomas


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@list...
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.