tags:

views:

45

answers:

1

I am using this code:

SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = _T("\\test\\WindowsCE\\test.exe");      
ShExecInfo.lpParameters = _T("");   
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL; 
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);

I have a program test.exe in the specified directory, but it gives me an error: Cannot find 'test' (or one of its componenet). Make sure the path and filename.... in a windows CE Device with an SD CArd, what could be the path???

A: 

Ususally the path for an SD card is \\Storage Card - you have to use the full path. You can just navigate to the file through ActiveSync or in the device itself and see the path you used to get there.

The path you specify means that under the root "folder" (My Device) there is a folder named test and under that a folder named WindowsCE and under tht you have the file.

Shaihi
There are other ways. For instance, if the executing program itself is also located on the SD card, you can get the module path. (`GetModuleFileName(NULL, buf, MAX_PATH)` returns a full path.)
MSalters