# StgIsStorageFile

Indicates whether a particular disk file contains a storage object.

WINOLEAPI StgIsStorageFile(

const WCHAR * pwcsName | //Points to a pathname 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.

See also any file system errors for other error return values.

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 will still return S_OK.

See Also

StgIsStorageILockBytes