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 creates a new bitmap image object from data supplied in a memory buffer and returns an interface pointer for the image object.

Syntax

HRESULT CreateBitmapFromBuffer(
  BitmapData*
bitmapData,
  IBitmapImage** 
bitmap
)

Parameters

bitmapData

[in] A pointer to an instance of a BitmapDataclass that contains data for the image and parameter information about the image.

bitmap

[out] A pointer to the resulting IBitmapImageinterface pointer. This interface provides the application with access to the new image.

Return Value

If successful, this method returns S_OK.

This method may return E_NOTIMPL if it fails.

Remarks

This method creates a bitmap image object on top of an application memory buffer.

The application is responsible for allocating and freeing the memory. It must ensure that the memory is valid throughout the lifetime of the bitmap image object.

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