Windows 已在 test.exe 中触发一个断点。
Windows 已在 test.exe 中触发一个断点。
其原因可能是堆被损坏,这说明 test.exe 中或它所加载的任何 DLL 中有 Bug。
原因也可能是用户在 test.exe 具有焦点时按下了 F12。
输出窗口可能提供了更多诊断信息。
这是什么问题?
其原因可能是堆被损坏,这说明 test.exe 中或它所加载的任何 DLL 中有 Bug。
原因也可能是用户在 test.exe 具有焦点时按下了 F12。
输出窗口可能提供了更多诊断信息。
这是什么问题?
BOOL CtestView::ZipAllFile(CString &cTarFile) //cTarFile : f:\主程序目录\etouch.exe
{
//MessageBox(cTarFile);
/* if (cTarFile == L"")return FALSE;
CInfoZip InfoZip;
if (!InfoZip.InitializeZip())return FALSE;
CString path=cTarFile;
int nPos=path.ReverseFind('\\');//从右边找到第一个“\\”字符,返回其数组下标的位置
path=path.Left(nPos+1); //保留字符串的前nPos+1个字符(包括“\\”);
if (nPos<2 || nPos>(MAX_PATH-40))return FALSE;
CString filename;
filename.Format(L"mymail%08x.zip",GetTickCount());
path=path+filename;//f:\主程序目录\mymail34234324.zip
BeginWaitCursor();
int nPages = m_PageManager.m_PageList.GetSize();
char **pFiles = (char **) new LPVOID [nPages];
int i=0;
for (i=0;i<nPages;i++)
{
pFiles[i] = new char[MAX_PATH+1];
memset(pFiles[i],0,MAX_PATH+1);
//wsprintf(pFiles[i],L"mymail%04d.JPG",i);
sprintf(pFiles[i],"mymail%04d.JPG",i);
CString ImageFile;// = pFiles[i];
ImageFile.Format(L"mymail%04d.JPG",i);
//CString ImageFile(pFiles[i]);
//string str( cstr );
m_PageManager.SavePageToImage(ImageFile,L"JPG",i);
}
BOOL sult = TRUE;
int len = WideCharToMultiByte(CP_ACP,0,path,path.GetLength(),NULL,0,NULL,NULL);
char *chr=new char[len+1];
WideCharToMultiByte(CP_ACP,0,path,path.GetLength(),chr,len+1,NULL,NULL);
chr[len]=0;
//string limage = chr;
if (!InfoZip.AddFiles(chr, pFiles, nPages))sult = FALSE;
if (!InfoZip.Finalize())sult = FALSE;
EndWaitCursor();
CString deletfile;
for(i=0; i<nPages; i++)
{
deletfile.Format(L"%s",pFiles[i]);
::DeleteFile(deletfile.AllocSysString());
delete pFiles[i];
}
delete pFiles;
cTarFile = path.AllocSysString();
return sult;*/
if (cTarFile == L"")return FALSE;
CInfoZip InfoZip;
if (!InfoZip.InitializeZip())return FALSE;
CString path=cTarFile;
int nPos=path.ReverseFind('\\');//从右边找到第一个“\\”字符,返回其数组下标的位置
path=path.Left(nPos+1); //保留字符串的前nPos+1个字符(包括“\\”);
if (nPos<2 || nPos>(MAX_PATH-40))return FALSE;
CString filename;
filename.Format(L"mymail%08x.zip",GetTickCount());
path=path+filename;//f:\主程序目录\mymail34234324.zip
BeginWaitCursor();
int nPages = m_PageManager.m_PageList.GetSize();
char **pFiles = (char **) new int [nPages];
for (int i=0;i<nPages;i++)
{
pFiles[i] = new char[MAX_PATH+1];
memset(pFiles[i],0,MAX_PATH+1);
sprintf(pFiles[i],"mymail%08x.JPG",i);
CString ImageFile = (CString)pFiles[i];
// CString ImageFile;// = pFiles[i];
// ImageFile.Format(L"mymail%08x.JPG",i);
//ImageFile.Format(L"%s",pFiles[i]);
m_PageManager.SavePageToImage(ImageFile,L"JPG",i);
}
BOOL sult = TRUE;
int len = WideCharToMultiByte(CP_ACP,0,path,path.GetLength(),NULL,0,NULL,NULL);
char *chr=new char[len+1];
WideCharToMultiByte(CP_ACP,0,path,path.GetLength(),chr,len+1,NULL,NULL);
chr[len]=0;
if (!InfoZip.AddFiles(chr, pFiles, nPages))sult = FALSE;
if (!InfoZip.Finalize())sult = FALSE;
EndWaitCursor();
CString deletfile;
for(int i=0; i<nPages; i++)
{
deletfile.Format(L"%s",pFiles[i]);
::DeleteFile(deletfile.AllocSysString());
delete pFiles[i];
}
delete pFiles;
cTarFile = path.AllocSysString();
return sult;
}
BOOL CInfoZip::AddFiles(const char *pszArchive, char ** paFiles, int iFileCount)
{
CZipParams zpParams;
SetDefaultValues(&zpParams);
// seting archive name
zpParams.m_pszArchiveFileName = (char*)malloc(strlen(pszArchive)+1);
ZeroMemory(zpParams.m_pszArchiveFileName, strlen(pszArchive)+1);
strcpy(zpParams.m_pszArchiveFileName, pszArchive);//复制 f:\目录\mymail234234.zip
// seting file count
zpParams.m_liFileCount = iFileCount;
// seting file names
for (int i=0; i<iFileCount; i++)
{
zpParams.m_pszFileNames[i] = (char*)malloc(MAX_PATH+1);
ZeroMemory(zpParams.m_pszFileNames[i], MAX_PATH+1);
strcpy(zpParams.m_pszFileNames[i], paFiles[i]);
}
// executing command
int iProcessedCount = m_ZipDllExec(&zpParams); //调试到这里出错。。。
ReleaseParams(&zpParams);
return (iProcessedCount == iFileCount);
}
...全文
相关推荐
ActiveX _Control_Test_Container 32位
ActiveX _Control_Test_Container 32位
VScode上配置 c语言环境的图文教程
主要介绍了配置VScode c语言环境,本文通过图文并茂的形式给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
AdvUNODIO.pas
研华UNO系列嵌入式工业级控制器IO卡Delphi编程实例。 测试环境:Delphi2010+Windows7
解决64位windows的数字签名问题的软件:dseo13b.exe
对于嵌入式初学者,都会遇到的64位windows无法解决数字签名问题的神器
firmata_test.exe.zip(windows)
firmata_test.exe.zip(windows),项目链接: https://github.com/firmata/firmata_test 官方下载链接: https://github.com/firmata/firmata_test/downloads


