LocalFree(lpErrorMsg);这句话会报以上那个错误
解决方案 »
- 求助,使用m_pSet->Requery()后,其结果如何使用
- 求sql语句的写法。我用vc存取数据库。数据库表table中,有一个数据类型为image(长度16)的imagedata字段。
- 紧急求助:关于消息隐射
- 散分,给和我一样的愤青们.
- HBITMAP怎么保存成BMP图片文件?
- 请问怎样做出能够预览位图的打开对话框?
- SDI分割视图,不允许用户调整每个分割视的大小?怎么实现
- 有人知道 write(1,buf,n); 是什么吗
- 如何用VC做个文件上传组件?
- 大神们,请问用MFC通过串口 CMSComm 类,控制Agilent34401A设备的程序,跪求大神解答。。。
- 请教主线程函数执行时,子线程得不到控制权
- <基于ADO技术的数据库类设计与实现>,谁能给点意见?谢谢
以下这段代码是启动一个进程并等待其结束,你参考一下: STARTUPINFO si;
PROCESS_INFORMATION pi; ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) ); // Start the child process.
if( !CreateProcess( NULL, // No module name (use command line).
TEXT("MyChildProcess"), // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi ) // Pointer to PROCESS_INFORMATION structure.
)
{
printf( "CreateProcess failed (%d).\n", GetLastError() );
return;
} // Wait until child process exits.
WaitForSingleObject( pi.hProcess, INFINITE ); // Close process and thread handles.
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
LPTSTR lpErrorMsg = (LPTSTR)LocalAlloc(LHND,appendMsgLen+errorMsgLen+sizeof(TCHAR)*2);
//这句都多余