[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
function ExecAndWait(Path: PChar; Timeout: DWORD): integer;
WaitResult : integer;
iResult : integer;
FillChar(StartupInfo, SizeOf(TStartupInfo), 0);
with StartupInfo do
cb := SizeOf(TStartupInfo);
dwFlags := STARTF_USESHOWWINDOW or STARTF_FORCEONFEEDBACK;
wShowWindow := sw_hide;
if CreateProcess(nil,path,nil, nil, False,
NORMAL_PRIORITY_CLASS, nil, nil,
StartupInfo, ProcessInfo) then
WaitResult := WaitForSingleObject(ProcessInfo.hProcess, timeout);
Result := WaitResult;
Result := GetLastError;
procedure TForm3.Button1Click(Sender: TObject);
S := '"C:\Program Files (x86)\Windows Media Components\Tools\wm8eutil" -input search_1.avi -output search_1.wmv';
Open in new window
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.