Hi.
I have a problem.
My application open solidworks files.
It was to be able to open solidworks2013's file, But It is can't open SolidWorks2015's.
I debuging source. And i know one.
first. error happened at "StgOpenStorage".
I think the reason that solidworks2013's file is "compound file" But 2015 is not.
So. I Changed method to use from "StgOpenStorage" to "StgOpenStorageEx"
I set STGFMT_ANY IN "StgOpenStorageEx". And I solved error.
But!! (Start ask from here)
Next of that source. My application get propperty inform use by IPropertySetStorage.Open.
---source
IStorage *pStorage = NULL;
hr = ::StgOpenStorageEx(wcFilename, openMode | STGM_SHARE_EXCLUSIVE, STGFMT_ANY,
0, NULL, NULL, IID_IPropertySetStorage, (void **)&pStorage);
IPropertySetStorage *pPropSetStg = NULL;
hr = pStorage->QueryInterface(IID_IPropertySetStorage, (void **)&pPropSetStg);
IPropertyStorage *pCustomPropStg = NULL;
hr = pPropSetStg->Open(FMTID_UserDefinedProperties,openMode | STGM_SHARE_EXCLUSIVE, &pCustomPropStg); <- return err
error is "STG_E_FILENOTFOUND"
um...I think the reason about this problem. method of Open, try to open solidworks2015's file by STGFMT_STORAGE(or anyother get rid of STGMT_ANY)
But, I don't know how can i solve this problem. Please teach me. Thank you!
SolidworksApi macros