- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am facing an error while initializing an instance of AcDbDatabase class. I have tried creating a pointer instance as well but even that fails with the same exception (AccessViolationException)
I need to read AcDbDatabaseSummaryInfo using acdbGetSummaryInfo method. That requires database as a parameter. If there's some other method to get SummaryInfo of the file?
void ReadProperties(std::wstring filename)
{
std::wcout << "Starting to read database info" << std::endl;
AcDbDatabase database(Adesk::kFalse);
std::wcout << "empty database cretaed" << std::endl;
std::wcout << L"Method call end" << std::endl;
}
Following is the detailed exception,
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at AcDbDatabase.{ctor}(AcDbDatabase* , Boolean , Boolean )
at Bentley.RealDwgWrapperDotNet.RDwgExtractor.ReadProperties(basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t> >* filename) in C:\Users\umar.aslam\Documents\Visual Studio 2022\Projects\RealDWGWrapper\RealDWGWrapper\RDwgExtractor.cpp:line 81
Any help in this regard?
Regards,
Umar
Solved! Go to Solution.