RunApp method of the class accepts two parameters: AppName and CommandLine.
Try the code calling various executables located inside \Windows directory on your PocketPC: Notes.exe, pxl.exe, sndplay.exe, tasks.exe, iexplore.exe, pword.exe etc.
* * *
At this point I am not aware how to terminate a remote process. There might be a way, I think, by using the CeRapiInvoke.
* * * CeRapiInvoke function, I am still struggling with, can be used to remotely execute routines in DLLs stored on Window CE device. This function accepts DLL and function names as parameters, as well as buffer with input parameters for the remote call and buffer for output parameters.
So far I was successful only in calling functions, which do not require input parameters, like Random and GetProcessHeap (both located in Coredll.dll) and similar to them. Hopefully I will be able to add this functionality to the class some time later.
* * *
This is how to create new email message on your Pocket PC:
cApp="\Windows\tmail.exe"
cCmd=[-TO "info@yourcompany.com" -SUBJECT "Test message" ] +;
[-BODY "Wake up!"]
rapi.RunApp(cApp, cCmd)
Note that the message will be stored in Drafts folder, not sent. Use other command line options: -CC, -BCC, -ATTACHMENT.
Would there be a way to have RunApp wait until the launched application was finished and closed. I played with trying to use WaitForSingleObject, but could not make it work. Thanks!
Credits: PHP (4.4.9), an HTML-embedded scripting language,
MySQL (5.1.55-log), the Open Source standard SQL database,
AceHTML Freeware
Version 4, freeware HTML Editor of choice. Hosted by Korax Online Inc.