Partager via


IImageEncoder::InitEncoder

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method initializes an image encoder object and associates it with an output stream.

Syntax

HRESULT InitEncoder(
  IStream* stream
);

Parameters

  • stream
    [in] A pointer to an IStream interface for the output stream.

    If the encoder requires a seekable stream and the stream is not seekable, the call to this method fails.

    You can verify whether the encoder requires a seekable stream by seeing whether the ImageCodecFlags enumeration value ImageCodecFlagsSeekableEncode is set.

Return Value

If successful, this method returns S_OK.

This method may return E_FAIL if it fails.

Remarks

Use the IImageEncoder::TerminateEncoder to break the association between the encoder and its output stream.

Requirements

Header imaging.h
Library Imaging.lib
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IImageEncoder
IImageEncoder::TerminateEncoder