Feature request: WinCE: make argv a function variable instead of a static function
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
This feature request relates to Lazarus, in particular to issue #0029059.
On Windows Lazarus "substitutes" argv with Utf8 representations of the original values (when the Ütf8 in RTL feature is used).
On WinCE however argv is a static function, so this cannot be done.
Steps to reproduce:
See components/lazutils/winlazfileutils.inc in Lazarus tree.
procedure SetupArgvAsUtf8;
var
i: Integer;
begin
SetLength(ArgsUTF8,length(ArgsW)); //ArgsUTF8: Array of String;
OldArgV:=argv;
GetMem(argv,SizeOf(Pointer)*length(ArgsW)); //ArgsW: Array of WideString;
for i:=0 to length(ArgsW)-1 do
begin
ArgsUTF8[i]:=ArgsW{%H-}[i];
argv[i]:=PChar(ArgsUTF8[i]);
end;
end;
This code of course will not compile on WinCE.
If argv would be a functionn variable, similar code could be used on WinCE.
Mantis conversion info:
- Mantis ID: 29070
- OS: Window
- OS Build: Win7
- Platform: i386
- Version: 3.0.0