15,471
社区成员
发帖
与我相关
我的任务
分享
hFile=CreateFile(path,GENERIC_WRITE,FILE_SHARE_READ,NULL,
OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);//先创建一个空的文件
if (hFile == INVALID_HANDLE_VALUE)
{
hFile = NULL;
MessageBoxA(NULL, "Can not open the file", "Playwav", MB_OK);
}
DWORD szBuffer[10024];
while(TRUE)
{
cs.Lock();
string iectxt =readata();
char chgetxtx[] ="";
strcpy(chgetxtx,iectxt.c_str());
WriteFile(hFile,chgetxtx, sizeof(iectxt) ,szBuffer,NULL);
Sleep(2000);
/*cs.Lock();
string str_str = readata();
str_new = str_old;
str_old = str_str.c_str();
string *a = new string(str_str);
vec_str.push_back(a);
cs.Unlock();
Sleep(1000);
WriteSY.SetEvent();
long dd= _ttoi(str_old);
cEdit->SetWindowTextW(str_old);*/
cs.Unlock();
Sleep(5000);
}
CIecClientSimulator1.2.exe 中的 0x6383ad4a (msvcp100d.dll) 处最可能的异常: 0xC0000005: 读取位置 0x0000203c 时发生访问冲突
CIecClientSimulator1.2.exe 中的 0x6383ad4a (msvcp100d.dll) 处有未经处理的异常: 0xC0000005: 读取位置 0x0000203c 时发生访问冲突
程序“[5400] CIecClientSimulator1.2.exe: 本机”已退出,返回值为 -1073741819 (0xc0000005)。