i use vc2005. when i debug in a function,the cursor doesn't piont to the excuted line. it piont to other lines before the excuted line. this has happened both in my own functions and functions of mfc library. i am using c++,mfc, xp professional sp2, and compiling with /Od (Disable optimization) . i clean the solution, and rebuild it. it don't become normal. how shold i do?
liuyue
Posts
-
why doesn't the cursor piont to the excuted line in single step debug? -
why doesn't the cursor piont to the excuted line in single step debug?i use vc++2005, mfc, xp professional sp2.when i debug in functions of a files,the cursor doesn't exactly piont to the excuted line, but it piont to the third line before the excuted line. however,in the other files, everything is normal. i cleaned the solution and rebuilded it, but it don't work yet. what shold i do to make it normal?
-
why does only a part of VARIANT change from VT_DATE to VT_BSTR?i want to chang the data of VT_DATE to the one of VT_BSTR with the VariantChangeTypeEx(&vargDest,&varSrc,2052,0,VT_BSTR) function, but only a part of the data is changed. for example,2005-12-20 0:00:00 is converted to 2005-12-20 of VT_BSTR, but 1899-12-30 21:30:00 is converted to 21:30:00 of VT_BSTR. both 2005-12-20 0:00:00 and 1899-12-30 21:30:00 are from sql server, and 2005-12-20 0:00:00 is smalldatetime; 1899-12-30 21:30:00 is datetime. how can i get the complete VT_BSTR data?
-
how to write the data of datetime type in database to the html document?are there the functions that convert the datetime format to string format?
-
how to write the data of datetime type in database to the html document?i have another question. how can i write the data of datetime type in sql server to the html document. the data of datetime from database is VARIANT (VT_DATE), but there is not datetime type in html. could you tell me how to do? thanks
-
why will the exception appear, when the mfcie's window is maximized from normalwhy will the exception appear, when the mfcie's window is maximized from normal or normal from maximized? Warning: constructing COleException, scode = DISP_E_MEMBERNOTFOUND ($80020003). Warning: constructing COleException, scode = DISP_E_MEMBERNOTFOUND ($80020003). First-chance exception in Book.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception. First-chance exception in Book.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception. the mfcie is a sample of MSDN.
-
how to deal with SafeArrayDestroy error?i call SysFreeString(bstr) for bstr , the param[0] is equal to bstr , and has nothing to bstr . i release bstr , but param[0] still exist. what's more, when i make param[1].vt = VT_BSTR; param[1].bstrVal = bstr;, the problem disappears. so i think the problem has nothing with SysFreeString(bstr).
-
how to deal with SafeArrayDestroy error?IHTMLDocument2 *document; // Declared earlier in my code HRESULT hr = GetHtmlDocument()->QueryInterface(IID_IHTMLDocument2,(void**) &document); if (!SUCCEEDED(hr)) { return; } HRESULT hresult = S_OK; VARIANT *param; SAFEARRAY *sfArray; BSTR bstr = SysAllocString(OLESTR("hjgjhgjghjhgjhgjhg
")); sfArray = SafeArrayCreateVector(VT_VARIANT, 0, 2); // Creates a new one-dimensional array if (sfArray == NULL || document == NULL) { goto cleanup; } hresult = SafeArrayAccessData(sfArray,(LPVOID*) & param);//获取数组元素 param[0].vt = VT_BSTR; param[0].bstrVal = bstr; param[1].vt = VT_R8; param[1].dblVal = 3.4567; hresult = SafeArrayUnaccessData(sfArray); hresult = document->writeln(sfArray); cleanup: SysFreeString(bstr); if (sfArray != NULL) { SafeArrayDestroy(sfArray); } when i debug , in SafeArrayDestroy(sfArray),an error arises : HEAP[Book.exe]: Invalid Address specified to RtlSizeHeap( 00140000, 02CF0358 ),and there is a messagebox: user breakpoint called from code at ox7c921230. how can i dispose of it? thanks.
-
how to change the content in chtmview?i build a app. its view is drived chtmview, and it can explore internet. but i want chang the content in chtmview, when i open a html page. for example, i want show the datas that are from database in view. how can i do?
-
when the program is closed, why does the exception occur?i debug my program in VC6.0. when it is closed, the exception "First-chance exception in F863.exe: 0xC0000005: Access Violation." will appear. and the cursor points to m_pInterface->Release().here are some codes: void _Release() throw() { if (m_pInterface != NULL) { m_pInterface->Release(); } } i define the variant:IApplicationPtr m_Application, and i find the exception occured in m_Application->Release(). here are some codes: int CF863App::ExitInstance() { if (m_Application != 0) m_Application->Release(); return CWinApp::ExitInstance(); } how can i resolve it?
-
where can i find the instruction of crystal report9 RDC in vc6.0?where can i find the instruction of crystal report9 RDC when i use it with vc6.0? there are only instructions about vb6.0 in its help. i dont know how to use the functions of report object in VC6.0. where can i find them?
-
why doesn't TRACE output correctly?CString strTemp strTemp.Format("%-60s%-20.1f\r\n%-60s%-20.1f\r\n%-60s%-20.1f\r\n","Global Wall",0,"Limiting Potential",0,"Roughness Correlation",0); TRACE("output:%s\n",strTemp); when debugging, the output is: output:Global Wall 0.0 (null) 0.0 ? -2.0 how can i dispose of the problem?
-
why does my view class disappear suddently?today, when i open my workspace in vc6.0, i don't find my view class in workspace window. but the .pp and .h files of the view class still exist. other classes also exist. i can use class wizard to edit the view class. how can i get it back?
-
why does CreateInstance("ADODB.Connection") bring out exception?before long, the program can run without error,but today it don't run. m_pConnection.CreateInstance("ADODB.Connection") return 0, and there is the exception----First-chance exception in GIS.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception. i write it in mfc. how can figure it out ?
-
how can i change "no_namespace" ?i want to apply ado to access database. i put following in my stdafx.h #import "c:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF", "adoEOF") but when i compile ,there are "error C2011: 'LockTypeEnum' : 'enum' type redefinition". what should i change no_namespace into?
-
what is MFCO42D.DLL?how can i deal with the problem?
-
what is MFCO42D.DLL?i debug my program, and the exception (unhandled exception in gis.exe(MFCO42D.DLL):0xc0000005 access violation.) arised when the instruction(mapinfo.CreateDispatch("MapInfo.Application"))run. how can i deal with it?
-
how can i know other programs change the table in access?i use vc6.0 to access data table in Access of MS, but the data table that i will access is built by the other program. i want to get the new data that program put into the table. because the program often put data into the table, i want to know when it change the table, and i want to get the new data that is put into table after the table is changed. Can Access of MS inform me?
-
How to register a component?After complete a componet ,how will I register a component? Is there the tool in VS6.0?
-
ask a question about a dialogue's classthank you, I get it. but why ? Is that vc's bug?