* assume unicode in case of FPC_OS_UNICODE instead of only for WinCE

git-svn-id: branches/cpstrrtl@24959 -
This commit is contained in:
Jonas Maebe 2013-06-24 09:39:57 +00:00
parent 112fafc6fd
commit e6c812a60a

View File

@ -71,11 +71,11 @@ uses
var
Tmm: TMemoryBasicInformation;
{$ifdef wince}
{$ifdef FPC_OS_UNICODE}
TST: array[0..Max_Path] of WideChar;
{$else wince}
{$else}
TST: array[0..Max_Path] of Char;
{$endif wince}
{$endif FPC_OS_UNICODE}
procedure GetModuleByAddr(addr: pointer; var baseaddr: pointer; var filename: string);
begin
baseaddr:=nil;
@ -86,11 +86,11 @@ uses
baseaddr:=Tmm.AllocationBase;
TST[0]:= #0;
GetModuleFileName(THandle(Tmm.AllocationBase), TST, Length(TST));
{$ifdef wince}
{$ifdef FPC_OS_UNICODE}
filename:= String(PWideChar(@TST));
{$else wince}
{$else}
filename:= String(PChar(@TST));
{$endif wince}
{$endif FPC_OS_UNICODE}
end;
end;