Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Waiting on desktop for CE app to complete.

1 view
Skip to first unread message

Roger

unread,
Mar 9, 2004, 8:02:52 AM3/9/04
to
Hello all.

I am using RAPI to launch a CE.NET 4.1 (not PocketPC or WM) console script
using CeCreateProcess from the desktop. The command being lauched is:

cmd /c <console-script>.bat

"cmd" is the lpApplicationName, and "/c <console-app>.bat" is the
lpCommandLine (this seems to be the only way to launch a command script
using CeCreateProcess).

When testing the exit code of the app (with the GetExitCodeProcess API)
using the process handle returned by CeCreateProcess in the
PROCESS_INFORMATION structure, I get "0x00000006: the handle is invalid"
from GetLastError. I get the same problem with WaitForDebugEvent when I
start CeCreateProcess as a DEBUG_PROCESS.

How can I detect the competion of a CE process from the desktop?

Thanks in advance for your input.

- ROger


Michael J. Salamone [eMVP]

unread,
Mar 9, 2004, 9:32:42 AM3/9/04
to
The handles returned by CeCreateProcess are CE handles. They cannot be
used, as you are finding, in any desktop functions.

If you want to know, from the desktop, when a process on the target has
terminated, you can create a custom RAPI function that does the process
creation and WaitForSingleObject (this code lives in DLL you create for the
device) and invoke it from the desktop using RapiInvoke(). More details are
in MSDN or your SDK help.

--
Have an opinion on the effectiveness of Microsoft Embedded newsgroups? Tell
Microsoft!
https://www.windowsembeddedeval.com/community/newsgroups


Michael Salamone [eMVP]
Entrek Software, Inc.
www.entrek.com

"Roger" <nos...@spamfreesociety.net> wrote in message
news:0gj3c.32018$PY.1...@newssvr26.news.prodigy.com...

0 new messages