Hi everyone! I met no problem with win32 console application,but when it turn to MFC in Visual C++,the same code dosen't work. Anyone can give me some suggestion? Thanks in advance!
*The error is:* Unhandeled exception in xxx.exe(sqlite3.dll)0xC0000005 Access Violation *More output:* Loaded 'ntdll.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found. Loaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL' Loaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL' Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found. Loaded symbols for 'C:\WINDOWS\system32\MFCO42D.DLL' Loaded 'G:\MFC\复件 SenateSystem\Debug\sqlite3.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\imm32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\secur32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\lpk.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\usp10.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\mfc42loc.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\uxtheme.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\MSCTF.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\msctfime.ime', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\comctl32.dll', no matching symbolic information found. First-chance exception in SenateSystem.exe (SQLITE3.DLL): 0xC0000005: Access Violation. *The following is my code: //access violation happened at here *void CMainView::myUpdateView() { CSenateSystemDoc* pDoc = GetDocument(); sqlite3_exec(pDoc->*m_db*,"select * from table1", sqlCallback_UpdateList, 0, &(pDoc->*m_pErrMsg*)); //The database *has been connected* before this line runs } *//declaration of m_db and m_pErrMsg *class CSenateSystemDoc : public CDocument { ... ... public: bool bLoggedIn; bool m_dbConnected; sqlite3 * m_db; char * m_pErrMsg; CString m_strSQL; ... ... *//CALL BACK FUNCTION* int CMainView::sqlCallback_UpdateList(void * notused, int argc, char ** argv, char ** szColName) { ... //These lines have nothing to do with access violation ... //,since my program crashed before it went to the breakpoint I set here return 0; } *//declaration of the callback function* class CMainView : public CListView { protected: ... ... static int sqlCallback_UpdateList(void * notused, int argc, char ** argv, char ** szColName); ... ... _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users