unhandle exception(8000ffff) while acceing ocx methods
-
i am trying to access mehod of ocx but its showing runtime error HRESULT hret; try { CoInitialize(NULL); // init of Com hret = testPtr.CreateInstance(__uuidof(TestOCX)); testPtr->Check(); //Crash here } catch( _com_error &e ) { // Get info from _com_error _bstr_t bstrSource(e.Source()); _bstr_t bstrDescription(e.Description()); TRACE( "\tCode = %08lx\n", e.Error()); TRACE( "\tCode meaning = %s\n", e.ErrorMessage()); TRACE( "\tSource = %s\n", (LPCTSTR) bstrSource); TRACE( "\tDescription = %s\n", (LPCTSTR) bstrDescription); } catch(...) { TRACE( "*** Unhandled Exception ***" ); } can anybody help me for the same thanx regards Rajesh
-
i am trying to access mehod of ocx but its showing runtime error HRESULT hret; try { CoInitialize(NULL); // init of Com hret = testPtr.CreateInstance(__uuidof(TestOCX)); testPtr->Check(); //Crash here } catch( _com_error &e ) { // Get info from _com_error _bstr_t bstrSource(e.Source()); _bstr_t bstrDescription(e.Description()); TRACE( "\tCode = %08lx\n", e.Error()); TRACE( "\tCode meaning = %s\n", e.ErrorMessage()); TRACE( "\tSource = %s\n", (LPCTSTR) bstrSource); TRACE( "\tDescription = %s\n", (LPCTSTR) bstrDescription); } catch(...) { TRACE( "*** Unhandled Exception ***" ); } can anybody help me for the same thanx regards Rajesh
What's the return value from
CreateInstance()
? --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ "Linux is good. It can do no wrong. It is open source so must be right. It has penguins. I want to eat your brain." -- Paul Watson, Linux Zombie -
i am trying to access mehod of ocx but its showing runtime error HRESULT hret; try { CoInitialize(NULL); // init of Com hret = testPtr.CreateInstance(__uuidof(TestOCX)); testPtr->Check(); //Crash here } catch( _com_error &e ) { // Get info from _com_error _bstr_t bstrSource(e.Source()); _bstr_t bstrDescription(e.Description()); TRACE( "\tCode = %08lx\n", e.Error()); TRACE( "\tCode meaning = %s\n", e.ErrorMessage()); TRACE( "\tSource = %s\n", (LPCTSTR) bstrSource); TRACE( "\tDescription = %s\n", (LPCTSTR) bstrDescription); } catch(...) { TRACE( "*** Unhandled Exception ***" ); } can anybody help me for the same thanx regards Rajesh
Sounds like a bug in the OCX, it might be expecting you to call some initialization function first. 0x8000ffff is E_CATASTROPHIC, which is pretty much a catch-all for "something bad happened". Is this your own ocx? If it is, you should be able to step through it in the debugger. If not, I'd still run it in the debugger and look for first-chance exceptions, that would be a good indication of something wrong in the 'Check' method.