调用WSASendTo(m_socket,&wsabuf,1,&dwSend,0,(SOCKADDR*)&addrTo,sizeof(SOCKADDR),NULL,NULL);
后出错,如图
该从哪入手排查呢?
怀疑和本机的金山毒霸防火墙有关系。
想办法拿到错误发生时刻的调用堆栈
推荐你看看http://blog.csdn.net/vagrxie/archive/2009/07/31/4398721.aspx
关于MiniDump的
minidump要研究一下了。。
这个行吗? 2008自带的。
msvcr90.dll!_output_l(_iobuf * stream=0x0012f8fc, const char * format=0x00403650, localeinfo_struct * plocinfo=0x00000000, char * argptr=0x0012f96c) 行1643 + 0x1 字节 C++
msvcr90.dll!_vscwprintf_helper(int (_iobuf *, const wchar_t *, localeinfo_struct *, char *)* outfn=0x78570f34, const wchar_t * format=0x00403650, localeinfo_struct * plocinfo=0x00000000, char * ap=0x0012f96c) 行441 + 0x24 字节 C
msvcr90.dll!_vscprintf(const char * format=0x00403650, char * ap=0x0012f96c) 行414 + 0x12 字节 C
mfc90.dll!ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > >::FormatV(const char * pszFormat=0x00403650, char * args=0x0012f96c) 行1890 + 0xc 字节 C++
mfc90.dll!ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > >::Format(const char * pszFormat=0x00403650, ...) 行2283 C++
chat.exe!CchatDlg::OnSock(unsigned int wParam=1888, long lParam=1) 行202 + 0x10 字节 C++
mfc90.dll!CWnd::OnWndMsg(unsigned int message=1025, unsigned int wParam=1888, long lParam=1, long * pResult=0x0012fa74) 行1897 C++
mfc90.dll!CWnd::WindowProc(unsigned int message=1025, unsigned int wParam=1888, long lParam=1) 行1755 + 0x17 字节 C++
mfc90.dll!AfxCallWndProc(CWnd * pWnd=0x00000000, HWND__ * hWnd=0x0001056a, unsigned int nMsg=1025, unsigned int wParam=1888, long lParam=1) 行240 + 0x11 字节 C++
mfc90.dll!AfxWndProc(HWND__ * hWnd=0x0001056a, unsigned int nMsg=1025, unsigned int wParam=1888, long lParam=1) 行402 + 0x10 字节 C++
mfc90.dll!AfxWndProcBase(HWND__ * hWnd=0x0001056a, unsigned int nMsg=1025, unsigned int wParam=1888, long lParam=1) 行441 + 0x16 字节 C++
user32.dll!77d18734()
[下面的框架可能不正确和/或缺失,没有为 user32.dll 加载符号]
> user32.dll!77d18816()
user32.dll!77d189cd()
user32.dll!77d196c7()
mfc90.dll!AfxInternalPumpMessage() 行183 C++
mfc90.dll!CDialog::DoModal() 行584 + 0x8 字节 C++
chat.exe!CchatApp::InitInstance() 行101 C++
mfc90.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f49, int nCmdShow=1) 行37 + 0x7 字节 C++
chat.exe!__tmainCRTStartup() 行574 + 0x1d 字节 C
kernel32.dll!7c817077()
从原代码查,肯定内存访问违例了。
如楼上所说,是unicode 下 cstring 和char *之间的转换造成的。