ASE, SQL, OLE, ADE

Reply
New Member
tg_wilk
Posts: 1
Registered: ‎05-31-2010
Message 1 of 1 (740 Views)

dwg creation date from c++

740 Views, 0 Replies
05-31-2010 04:29 PM
Hi,

I'm trying to read autocad file creation date from c++. I don't mean system file creation date, but a drawing creation date (which remains unchanged when the document is copied somewhere else). To do this, I'm using the code as below (it is just a part of the whole). It works on doc and xls files but for dwg it shows "Not a compound file". Which is not true, because windows doesn't have a problem to read the statistics (creation date included) on dwg file.
Any suggestions where to look for the problem, or how to do this for dwg ? Isn't dwg a compound document?

Thanks

The code:
// Open the document as an OLE compound document.
      hr = ::StgOpenStorage(filename, NULL,
      STGM_READ | STGM_SHARE_EXCLUSIVE, NULL, 0, &pStorage);

      if(FAILED(hr)) {
         if(hr == STG_E_FILENOTFOUND)
            _stprintf_s(Result,MAX_PROPERTY_LENGTH,_T("File not found."));
         else if(hr == STG_E_FILEALREADYEXISTS)
            _stprintf_s(Result,MAX_PROPERTY_LENGTH,_T("Not a compound file."));
         else
            _stprintf_s(Result,MAX_PROPERTY_LENGTH,_T("StgOpenStorage() failed w/error %08lx"), hr);
         return DateResult;
      }

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community