ReadClassStg

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function reads the CLSID previously written to a storage object with the WriteClassStg.

Syntax

WINOLEAPI ReadClassStg( 
  IStorage* pStg,
  CLSID* pclsid 
);

Parameters

  • pStg
    [in] Pointer to the IStorage interface on the storage object containing the CLSID to be retrieved.
  • pclsid
    [out] Pointer to where the CLSID is written. Can return CLSID_NULL.

Return Value

This function supports the standard return value E_OUTOFMEMORY. The return value S_OK means that the CLSID was returned successfully.

This function also returns any of the error values returned by the IStorage::Stat method.

Remarks

Passing into this function any invalid and, under some circumstances, NULL pointers results in unexpected termination of the application.

This function is a helper function that calls the IStorage::Stat method and retrieves the CLSID previously written to the storage object with a call to WriteClassStg from the STATSTG structure.

To determine whether the platform supports this function, see Determining Supported COM APIs.

Requirements

Header ole2.h
Library ole32.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IStorage
IStorage::Stat
STATSTG
WriteClassStg