Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/143.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/5/actionscript-3/7.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++ 在缓存c+;中找不到CreateProcess应用程序+;MFC_C++_Createprocess - Fatal编程技术网

C++ 在缓存c+;中找不到CreateProcess应用程序+;MFC

C++ 在缓存c+;中找不到CreateProcess应用程序+;MFC,c++,createprocess,C++,Createprocess,我正在编写一个调用CreateProcess数千次的简单程序,因此运行它需要一段时间。在我的输出窗口中,我每次都会看到此消息 application "whatever.exe" not found in cache 我这样叫CreateProcess BOOL result = CreateProcess(NULL, g_minicapcmd, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW, NULL,

我正在编写一个调用CreateProcess数千次的简单程序,因此运行它需要一段时间。在我的输出窗口中,我每次都会看到此消息

application "whatever.exe" not found in cache
我这样叫CreateProcess

BOOL result = CreateProcess(NULL, g_minicapcmd,
        NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW, NULL, NULL, &startupInfo, &processInformation);
    if (!result)   {
            LPVOID lpMsgBuf;
            DWORD dw = GetLastError();
            FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 
                        NULL, dw, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL);

            CString strError = (LPTSTR) lpMsgBuf;
            TRACE(_T("::executeCommandLine() failed at CreateProcess()\nCommand=%s\nMessage=%s\n\n"), g_minicapcmd, strError);
            LocalFree(lpMsgBuf);
            return false;
    } else {
            // Successfully created the process.  Wait for it to finish.
            WaitForSingleObject( processInformation.hProcess, INFINITE );

            // Close the handles.
            CloseHandle( processInformation.hProcess );
            CloseHandle( processInformation.hThread );

    }

有没有办法让它缓存起来,或者有什么办法让它更快?我已经尝试将.exe加载到ramdisk上,这有点帮助

谷歌“应用程序未在缓存中找到”的首要结果是这个问题。你确定你的程序没有打印它吗?我可以看到它是在我跨过CreateProcess时生成的