mwcmp
asked on
open a software from the my application
Is there a way to open another software that is installed into my pocket pc, not by clicking on the software itself, but through my codes?
ASKER
>>NORMAL_PRIORITY_CLASS
Can't seems to be suppported, so I change it to 0
The other application is unable to be open. I also realised that whne my applicationn runs, it failed to enter the if(bSuccess) loop.
Can't seems to be suppported, so I change it to 0
The other application is unable to be open. I also realised that whne my applicationn runs, it failed to enter the if(bSuccess) loop.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
info.lpDirectory = _T("\\Program Files\\Veo Travler\\Veo\\");
info.lpFile = _T("VeoTravler.exe");
Where did I go wrong?
info.lpFile = _T("VeoTravler.exe");
Where did I go wrong?
try to remove the last \\ fro directory
ASKER
Yes. Tried.
I suppose the directory goes that way? Or did I miss anything else at the beginning?
I suppose the directory goes that way? Or did I miss anything else at the beginning?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. It works. :)
CreateProcess(
LPCWSTR lpszImageName,
LPCWSTR lpszCmdLine,
LPSECURITY_ATTRIBUTES lpsaProcess,
LPSECURITY_ATTRIBUTES lpsaThread,
BOOL fInheritHandles,
DWORD fdwCreate,
LPVOID lpvEnvironment,
LPWSTR lpszCurDir,
LPSTARTUPINFOW lpsiStartInfo,
LPPROCESS_INFORMATION lppiProcInfo);
It runs under Windows ce.
Example:
STARTUPINFO si = { sizeof(STARTUPINFO) };
PROCESS_INFORMATION pi = {0};
BOOL bSuccess;
bSuccess = CreateProcess ( NULL, "C:\\Program Files\\Internet xplorer\\IEXPLORE.exe ", NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS,
NULL, NULL, &si, &pi );
//TerminateProcess to close the application
if(bSuccess){
TerminateProcess(pi.hProce
CloseHandle ( pi.hThread );
CloseHandle ( pi.hProcess );
Good Luck!