Share via


IImageDecoder::InitDecoder (Windows Embedded CE 6.0)

1/6/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::TerminateDecoder method.

Syntax

HRESULT InitDecoder(
  IStream*        stream,
  DecoderInitFlag flags
);

Parameters

  • stream
    [in] A pointer to the IStream interface that provides the decoder with the input data stream.
  • flags
    [in] One or more DecoderInitFlag enumeration 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 Flags member 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

See Also

Reference

IImageDecoder
IImageDecoder::TerminateDecoder
DecoderInitFlag
IImageDecoder::GetImageInfo
IImageDecoder::GetPropertyItem
ImageCodecInfo

Other Resources

IStream