简体   繁体   English

如何使用ShellExecuteEx在Windows CE上运行应用程序?

[英]how to use ShellExecuteEx to run an application on windows ce?

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). 我在指定目录中有一个程序test.exe,但是它给我一个错误:找不到“ test”(或其组件之一)。 Make sure the path and filename.... in a windows CE Device with an SD CArd, what could be the path??? 确保路径和文件名....在带有SD CA的Windows CE设备中,可能是路径???

Ususally the path for an SD card is \\\\Storage Card - you have to use the full path. 通常SD卡的路径是\\\\Storage Card - 您必须使用完整路径。 You can just navigate to the file through ActiveSync or in the device itself and see the path you used to get there. 您可以通过ActiveSync或设备本身导航到该文件,并查看您用于实现该目标的路径。

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. 您指定的路径意味着在根“文件夹”(我的设备)下有一个名为test的文件夹,在该文件夹下有一个名为WindowsCE的文件夹,并且您拥有该文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Windows CE上从C ++运行EXE应用程序 - How to run an EXE application from C++ on windows CE 使用ShellExecuteEx和动词“ runas”运行应用程序时如何预选管理员? (Windows XP) - How to preselect Administrator when running an application using ShellExecuteEx with verb “runas”? (Windows XP) 如何在Windows CE环境中使用UnitTest ++? - How to use UnitTest++ on Windows CE Environment? 如何将以ShellExecuteEx作为子进程运行的进程在父退出后关闭? - How to run a process with ShellExecuteEx as as a child that closes after parent exit? Windows CE 7.0应用程序无法分步调试 - Windows CE 7.0 application unable to debbug in steps 等待ShellExecuteEx(在Windows进程上设置访问权限) - Waiting for ShellExecuteEx (Setting access rights on Windows process) 如何使__declspec(thread)在Windows CE上工作 - How to get __declspec(thread) working on Windows CE 如何实现在Windows CE 7上使用的ISampleGrabber - How to implement ISampleGrabber to be used on Windows CE 7 强制应用程序使用C ++在Windows CE上关闭 - Force application to close on Windows CE using C++ 如何在Windows下为Windows Mobile(Windows CE)编译Qt 4.6.3? - How to compile Qt 4.6.3 for Windows Mobile (Windows CE) under Windows?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM