Hello Mike,
On 03.11.2005 07:24:42 Mike McCormack wrote:
ChangeLog: Pass the correct verb. Add a space between extra parameters. Wait for ShellExecute to complete.
[...]
if( ShellExecuteExW( &sei ) )
- {
if (sei.hProcess)
WaitForSingleObject(sei.hProcess, 10000); r = S_OK;
- } else r = E_FAIL;
You should add an "CloseHandle(sei.hProcess);" after the wait call to avoid the handle leak.
Regards,
Martin