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 method initializes the image decoder object with an input data stream.

The decoder assumes this input stream is always seekable.

After the decoder object is initialized with a stream, it is associated with that stream until you call the IImageDecoder::TerminateDecodermethod.

Syntax

HRESULT InitDecoder(
  IStream*	
stream,
  DecoderInitFlag 
flags
);

Parameters

stream

[in] A pointer to the IStreaminterface that provides the decoder with the input data stream.

flags

[in] One or more DecoderInitFlagenumeration values specifying the initialization parameters for the decoder.

If you set the DecoderInitFlagNoBlock flag, the decoder is nonblocking. This means that when the decoder runs out of data it returns E_PENDING for the following methods:

Setting the DecoderInitFlagNoBlock flag has no effect on blocking decoders. Blocking decoders have the ImageCodecFlagsBlockingDecode flag set in the Flagsmember of ImageCodecInfo.

Return Value

If successful, this method returns S_OK.

This method may return E_FAIL if it fails.

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