Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function writes a CLSID to the specified stream object so it can be read by the ReadClassStmfunction. Most applications do not call WriteClassStmdirectly.

Syntax

WINOLEAPI  WriteClassStm(
  IStream* 
pStm,
  REFCLSID 
rclsid
);

Parameters

pStm

[in] IStreampointer to the stream into which the CLSID is to be written.

rclsid

[in] CLSID to write to the stream.

Return Value

S_OK

Indicates the CLSID was successfully written.

STG_E_MEDIUMFULL

The CLSID could not be written because there is no space left on device.

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

Remarks

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

The WriteClassStmfunction writes a CLSID to the specified stream object so it can be read by the ReadClassStmfunction. Most applications do not call WriteClassStmdirectly.

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