
Thu, 11/26/2009 - 15:27
Forums:
Hi folks.
I have a run time error when using TDocStd_Document.
Handle(TDocStd_Application) anApp;
Handle(TDocStd_Document) aDoc;
anApp->NewDocument ("XmlXCAF", aDoc);
when i access to aDoc as line 3, Access violation is encountered.
Error message is;
Unhandled exception at 0x011b5d23 in testCSdis.exe: 0xC0000005: Access violation reading location 0xfefd0000.
I followed the example in the references, but i got an error.
Can anyone help me ??
Thanks in advance
Thu, 11/26/2009 - 15:33
Hi UlikeM,
I think you should instantiate anApp before to use it.
Try this
Handle(TDocStd_Document) aDoc;
Handle(XCAFApp_Application) anApp = XCAFApp_Application::GetApplication();
anApp->NewDocument("XmlXCAF", aDoc);
Hope this helps.
Fri, 11/27/2009 - 05:34
Thanks for your help, Thiago Macedo.
It was so stupid question, haha
I didn't initialize the document, which makes access violation.
Thanks again !