为什么我的CreateProcess(一个外部的exe)会不行啊?GetLastError()返回是2
btw:2是什么意思?哪里能查到?
btw:2是什么意思?哪里能查到?
解决方案 »
- VC2005 静态编译问题(MD,MT)(高手请进)
- 简单问题,radio button
- 用的是list显示数据库内容,向数据库添加内容的时候,就是点添加弹出窗口,然后确定后就出错了,为什么啊?
- 求《COM/DCOM编程指南》随书光盘上的源程序
- 关于Win32 Service的功能一问(Win2K下)
- 如何得到一个文件在不同的文件系统下(如Fat,NTFS)所占用的磁盘空间?
- 使用API写注册表的权限问题
- 我在编译时,想编译Stdafx.h,按下ctrl+f7时,提示出错消息框:cannot compile....,no compile tool is associated with the file extensi
- help:画一个点的CDC member function is ....?
- 怎么改变编辑框里的文本字体大小?
- 发现了一个能用的GOOGLE
- 怎样运行程序所在的目录?
check the path of exe file
检查每个参数,确保其正确。
#ifdef _DEBUG
_T("notepad.exe"),
#else
_T("notepad.exe"),
#endif
buffer, // command line
NULL, // process security attributes
NULL, // primary thread security attributes
TRUE, // handles are inherited
0,
NULL, // use parent's environment
NULL, // use parent's current directory
&m_siStartInfo, // STARTUPINFO pointer
&m_piProcInfo); // receives PROCESS_INFORMATION
if (m_thread_created == FALSE) {
char buffer[512];
sprintf(buffer, "Thread error is %d", GetLastError());
AfxMessageBox(buffer);
}
startup.cb = sizeof( startup );
startup.wShowWindow = SW_SHOWNORMAL; memset( &process, 0, sizeof( process ) );receives PROCESS_INFORMATION