WriteClassStg function (coml2api.h)

The WriteClassStg function stores the specified class identifier (CLSID) in a storage object.

Syntax

HRESULT WriteClassStg(
  [in] LPSTORAGE pStg,
  [in] REFCLSID  rclsid
);

Parameters

[in] pStg

IStorage pointer to the storage object that gets a new CLSID.

[in] rclsid

Pointer to the CLSID to be stored with the object.

Return value

This function returns HRESULT.

Remarks

The WriteClassStg function writes a CLSID to the specified storage object so that it can be read by the ReadClassStg function. Container applications typically call this function before calling the IPersistStorage::Save method.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header coml2api.h (include Ole2.h)
Library Ole32.lib
DLL Ole32.dll

See also

OleSave

ReadClassStg