Commit 69ff6f74 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

ole32: Simplify the FileMonikerImpl_BindToStorage code.

parent 7447b37f
......@@ -605,22 +605,11 @@ FileMonikerImpl_BindToStorage(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLef
/* get the file name */
IMoniker_GetDisplayName(iface,pbc,pmkToLeft,&filePath);
/* verify if the file contains a storage object */
res=StgIsStorageFile(filePath);
res=StgOpenStorage(filePath,NULL,STGM_READWRITE|STGM_SHARE_DENY_WRITE,NULL,0,&pstg);
if(res==S_OK){
if (SUCCEEDED(res))
*ppvObject=pstg;
res=StgOpenStorage(filePath,NULL,STGM_READWRITE|STGM_SHARE_DENY_WRITE,NULL,0,&pstg);
if (SUCCEEDED(res)){
*ppvObject=pstg;
IStorage_AddRef(pstg);
return res;
}
}
CoTaskMemFree(filePath);
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment