Start process remotely and wait for execution

  • Thread starter Thread starter Fatih Iþýkhan
  • Start date Start date
F

Fatih Iþýkhan

Hi All,

Is it possible to get return code from remotely started process? Wait
until process stops execution?

Thanks,
 
Sure, maybe. What do you mean by "remotely started process"? You're
running a program on your Windows CE device using ActiveSync and RAPI or
what?

Paul T.
 
Sure, maybe. What do you mean by "remotely started process"? You're
running a program on your Windows CE device using ActiveSync and RAPI or
what?

Paul T.

Yes, I am starting process with RAPI through Activesync in WM5.
 
There isn't a WaitForSingleObject API in RAPI so no way to directly wait
while the process executes. Assuming you wrote the device code you could
have it write out to the registry or a file when it has finished and poll
for this from the desktop through RAPI...

Peter
 
There isn't a WaitForSingleObject API in RAPI so no way to directly wait
while the process executes. Assuming you wrote the device code you could
have it write out to the registry or a file when it has finished and poll
for this from the desktop through RAPI...

Peter

This is exactly what i am doing right now and I wanted to know if
there is a shortcut.

Thanks,
 
Hi,

Fatih Isikhan said:
This is exactly what i am doing right now and I wanted to know if
there is a shortcut.

The only other way I know of would to produce a small client side DLL that
contains a function that calls WaitForSingleObject for the specified process
id. You could then use CeRapiInvoke
(http://msdn2.microsoft.com/en-us/library/aa454605.aspx) on your desktop to
have this function execute on your PDA.

Having said that if you've already got a small status flag in the registry
etc doing the above is most likely more effort than it's worth. Especially
with the security implications of attempting to transfer/invoke custom DLLs
via RAPI on many modern Windows Mobile devices.

Hope this helps,
Christopher Fairbairn
 
Back
Top