@wp marcov
Thank you for your help! But I couldn't get this thing right, maybe I didn't understand what I was trying to say with Google Translate. I want to use lazarUS to run a delphi compiled EXE program with run parameters (sys123.exe),
delphi under the code is as follows(delphi does not have ParamStrUTF8):
program E1;
uses
Forms,Dialogs,SysUtils,
EndM1 in 'EndM1.pas' {Form1};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
if ParamStr(2)<>'程序123' then
begin
ShowMessage('Missing parameter:'+ParamStr(2));
Application.Terminate;
Exit;
end;
Application.Run;
end.
////////////////////////////
Click the button under lazarUS to run the "sys123.exe" external program with the following code:
procedure Tfrm_xw.BitBtn2Click(Sender: TObject);
var
sFileName, sParam, sFilePath: string;
begin
{$ifdef windows}
sFileName := ExtractFilePath(Application.ExeName) + '\sys123.exe';
sFilePath := 'ExtractFilePath(Application.ExeName)';
sParam := 'HosfeiDSf3se51d 程序123 {BE5EB793-6D96-44F8-B194-0BC3111DAF51} ';
ShellExecute(0, 'Open', PChar(sFileName), PChar(sParam),PChar(sFilePath), SW_SHOW);
{$endif}
end;
But will the compiled characters in sys123.exe obtained under lazarUS be garbled?
I just want to realize that the Chinese parameters passed between the two are not garbled, thank you!!