前提
SDK版本 CH-NetSDK(Windows32)V5.2.0.0_build20221008
开发环境 VS2017
编译
启动Demo示例\3-MFC综合示例路径下解决方案
提示出错
static auto_ptr<char> pcBuf (new char [iLogFileSize]);
解决方案
void CLS_NVSLogPage::UI_UpdateNVSLogList()标签:char,伟业,iLogonID,iLen,pcBuf,摄像机,edtLogInfo,iLogFileSize,SDK From: https://blog.51cto.com/fengyuzaitu/5966287
{
int iLen = 0;
const int iLogFileSize = 1024*1024;
//static auto_ptr<char> pcBuf (new char [iLogFileSize]);
static char* pcBuf(new char[iLogFileSize]);
//memset(pcBuf.get(), 0, iLogFileSize);
memset(pcBuf, 0, iLogFileSize);
m_edtLogInfo.Clear();
//if(0 == NetClient_LogFileGetDetails(m_iLogonID, pcBuf.get(), &iLen))
if (0 == NetClient_LogFileGetDetails(m_iLogonID, pcBuf, &iLen))
{
if(iLen)
m_edtLogInfo.SetWindowText(pcBuf);
//m_edtLogInfo.SetWindowText(pcBuf.get());
}
else
{
AddLog(LOG_TYPE_FAIL,"","LogFileGetDetails Error!(%d)",m_iLogonID);
}
}