Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/148.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 今天在PocketPC上执行一个程序不会';行不通_C++_Windows_Debugging_Pocketpc - Fatal编程技术网

C++ 今天在PocketPC上执行一个程序不会';行不通

C++ 今天在PocketPC上执行一个程序不会';行不通,c++,windows,debugging,pocketpc,C++,Windows,Debugging,Pocketpc,我有以下问题。我正在使用DLL为PocketPC 2002上的“今天”项目列表添加一个新菜单项。我已经在WindowsMobile6.5.3上测试了编写的DLL,它在那里工作 在PocketPC上,路径包含一个空格,我想我没有正确地转义字符串。考虑以下问题发生的片段: char commandline[100]; strcpy(commandline, "\\SDMMC Disk\\Test\\Test.exe"); STARTUPINFO si

我有以下问题。我正在使用DLL为PocketPC 2002上的“今天”项目列表添加一个新菜单项。我已经在WindowsMobile6.5.3上测试了编写的DLL,它在那里工作

在PocketPC上,路径包含一个空格,我想我没有正确地转义字符串。考虑以下问题发生的片段:

        char commandline[100];
        strcpy(commandline, "\\SDMMC Disk\\Test\\Test.exe");
        STARTUPINFO si = { sizeof(si) };
        int len;
        int slength = (int)strlen(commandline) + 1;
        len = MultiByteToWideChar(CP_ACP, 0, commandline, slength, 0, 0); 
        wchar_t* buf = new wchar_t[len];
        MultiByteToWideChar(CP_ACP, 0, commandline, slength, buf, len);

        PROCESS_INFORMATION pinfo;
        ::CreateProcess(buf, buf, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pinfo); 
现在,我正试图像这样避开可执行文件的路径:

strcpy(commandline, "\"\\SDMMC Disk\\Test\\Test.exe"");
但不幸的是,这不起作用。我是不是用错误的方法逃脱了绳子

谢谢你的帮助