uses
.., Winapi.ShellAPI;
var
SEInfo: TShellExecuteInfo;
begin
//초기화
//D2009이상
SEInfo := Default(TShellExecuteInfo);
//D2009미만
FillChar(SEInfo, SizeOf(TShellExecuteInfo), #0);
SEInfo.cbSize := SizeOf(TShellExecuteInfo);
SEInfo.fMask := SEE_MASK_NOCLOSEPROCESS;
SEInfo.lpVerb := 'Open';
SEInfo.lpFile := PChar('실행할 파일');
SEInfo.lpParameters := PChar('');
if ShellExecuteEX(@SEInfo) then
WaitForSingleObject(SEInfo.hProcess, INFINITE);
end;
참조 - https://docs.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-shellexecuteinfoa
반응형