exception in xxx.exe(KERNEL32.DLL):0xE06D7363:Microsoft C++ Exception
编译通过了,在调试的时候出现这样的问题:
First-chance exception in xxx.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
BOOL CInvoiceClientApp::InitInstance()
{
// 初始化 OLE 库
if (!AfxOleInit())
{
AfxMessageBox("OLE_INIT_FAILED");
return FALSE;
}
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls();// Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic();// Call this when linking to MFC statically
#endif
// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CInvoiceClientDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CInvoiceClientView));
AddDocTemplate(pDocTemplate);
m_pDoctempMakePhyInv = pDocTemplate;
// 将ClientStatus所有位设置为1
ClientStatus.set();
// 建立数据库连接
if(!ConnectDataBase())
{
returnFALSE;
}
g_pFcr = new CTaxFlowManage;
// Parse command line for standard shell commands, DDE, file open
//下面这几行代码是程序启动时创建新文档的关键代码
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
}
程序调试到这里就出现这个错误。我觉得可能是数据库连接是不是出问题啦,希望大家指点一下。
[解决办法]
BOOL CInvoiceClientApp::InitInstance(){// 初始化 OLE 库if (!AfxOleInit()){AfxMessageBox("OLE_INIT_FAILED");return FALSE;}AfxEnableControlContainer();// Standard initialization// If you are not using these features and wish to reduce the size// of your final executable, you should remove from the following// the specific initialization routines you do not need.#ifdef _AFXDLLEnable3dControls(); // Call this when using MFC in a shared DLL#elseEnable3dControlsStatic(); // Call this when linking to MFC statically#endif// Change the registry key under which our settings are stored.// TODO: You should modify this string to be something appropriate// such as the name of your company or organization.SetRegistryKey(_T("Local AppWizard-Generated Applications"));LoadStdProfileSettings(); // Load standard INI file options (including MRU)// Register the application's document templates. Document templates// serve as the connection between documents, frame windows and views.CSingleDocTemplate* pDocTemplate;pDocTemplate = new CSingleDocTemplate(IDR_MAINFRAME,RUNTIME_CLASS(CInvoiceClientDoc),RUNTIME_CLASS(CMainFrame), // main SDI frame windowRUNTIME_CLASS(CInvoiceClientView));AddDocTemplate(pDocTemplate);m_pDoctempMakePhyInv = pDocTemplate; // 将ClientStatus所有位设置为1ClientStatus.set();// 建立数据库连接if(!ConnectDataBase()){return FALSE;}g_pFcr = new CTaxFlowManage;// Parse command line for standard shell commands, DDE, file open//下面这几行代码是程序启动时创建新文档的关键代码CCommandLineInfo cmdInfo;ParseCommandLine(cmdInfo);// Dispatch commands specified on the command lineif (!ProcessShellCommand(cmdInfo))return FALSE;}