windows_programming_notes.nbk: Home | Index | Next Page: OPENFILENAME | Previous Page: OffsetRect


 OleLoadPicture

Creates a new picture object and initializes it from the contents of a stream. This is equivalent to calling OleCreatePictureIndirect(NULL, ...) followed by IPersistStream::Load.

    STDAPI OleLoadPicture( 
        IStream* pStream,   //Pointer to the stream that contains picture's data
        LONG lSize,         //Number of bytes to be read from the stream
        BOOL fRunmode,      //The opposite of the initial value of the picture's 
                            // property
        REFIID riid,        //Reference to the identifier of the interface 
                            // describing the type of interface pointer to return
        VOID ppvObj         //Address of output variable that receives interface 
                            // pointer requested in riid
    );

Parameters

Return Values

This function supports the standard return values E_OUTOFMEMORY and E_UNEXPECTED, as well as the following:

Remarks

The stream must be in BMP (bitmap), WMF (metafile), or ICO (icon) format. A picture object created using OleLoadPicture always has ownership of its internal resources (fOwn==TRUE is implied).

Requirements

For an explanation of the requirement values, see Requirements (COM).


windows_programming_notes.nbk: Home | Index | Next Page: OPENFILENAME | Previous Page: OffsetRect


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time