StgIsStorageFile

Indicates whether a particular disk file contains a storage object.

WINOLEAPI StgIsStorageFile(
  const WCHAR * pwcsName  //Points to a path of the file to check
);
 

Parameter

pwcsName
[in] Points to the name of the disk file to be examined. The pwcsName parameter is passed uninterpreted to the underlying file system.

Return Values

S_OK
Indicates the file contains a storage object.
S_FALSE
Indicates the file does not contain a storage object.
STG_E_INVALIDFILENAME
Indicates a bad filename was passed in the pwcsName parameter.
STG_E_FILENOTFOUND
Indicates the file was not found.

This function can also return any file system errors or Win32 errors wrapped in an HRESULT.

Remarks

At the beginning of the disk file underlying a storage object is a signature distinguishing a storage object from other file formats. The StgIsStorageFile function is useful to applications whose documents use a disk file format that might or might not use storage objects.

If a root compound file has been created in transacted mode but not yet committed, this method still return S_OK.

QuickInfo

  Windows NT: Use version 3.1 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in objbase.h.
  Import Library: Included as a resource in ole32.dll.

See Also

StgIsStorageILockBytes