ShowerThoughts
2009-08-27 01:24:36
Hey!
In short I want my program to run game executable's but I think because I am using the application handle it doesn't how can I get the user handle so the executable thinks it gets executed by a user for example?
Error.
I would deeply appreciate your help.
In short I want my program to run game executable's but I think because I am using the application handle it doesn't how can I get the user handle so the executable thinks it gets executed by a user for example?
procedure Run(Path:string);
var
SEInfo: TShellExecuteInfo;
ExitCode: DWORD;
ExecuteFile: string;
begin
ExecuteFile := Path;
FillChar(SEInfo, SizeOf(SEInfo), 0);
SEInfo.cbSize := SizeOf(TShellExecuteInfo);
with SEInfo do begin
fMask := SEE_MASK_NOCLOSEPROCESS;
Wnd := Application.Handle;
lpFile := PChar(ExecuteFile);
nShow := SW_SHOWNORMAL;
end;
ShellExecuteEx(@SEInfo);
end;
Error.I would deeply appreciate your help.