Re: WaitForSingleObject returns immediately
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Mon, 18 Feb 2008 09:08:49 -0700
Not sure, but startInfo is not supported, according to the help I have.
What's that set to? What version of Windows CE are we talking about?
Paul T.
"Fabio" <Fabio@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0C785499-92D4-472B-9C4A-EAFDEF8E7EB2@xxxxxxxxxxxxxxxx
Hi.
I'm making an application that needs to launch an external application and
wait until it is closed to continue. Here's is the code:
if (!(ret = !CreateProcess(szCommand, szArgs, null, null, false, 0,
null,
null, startInfo, &processInfo)))
{
WaitForSingleObject(processInfo.hProcess, INFINITE);
GetExitCodeProcess(processInfo.hProcess, &ret);
}
CloseHandle(processInfo.hThread);
CloseHandle(processInfo.hProcess);
}
It works in WIN32 with any application and works in WINCE when the
application launched is the HelloWorld example created by evc4 using the
new
project wizard. However, it does not work in WINCE when I call other
applications, like iexplore, notes, pword, fexplore, etc...
Instead of waiting, the function returns immediately the value
WAIT_OBJECT_0
and GetExitCodeProcess fills the ret variable with 0, even though the
process
is still running.
What should I do to make it work as expected?
Thanks in advance.
.
- Follow-Ups:
- Re: WaitForSingleObject returns immediately
- From: Fabio
- Re: WaitForSingleObject returns immediately
- Prev by Date: Re: XML Deserialization of a huge XML file
- Next by Date: Re: WaitForSingleObject returns immediately
- Previous by thread: Re: Rendering PNG Images in Windows CE 5.0
- Next by thread: Re: WaitForSingleObject returns immediately
- Index(es):
Relevant Pages
|