Component Automation
OleLoadPictureFile

Creates an IPictureDisp object from a picture file on disk.

HRESULT OleLoadPictureFile(
  VARIANT     varFileName,
  LPDISPATCH  *lplpdispPicture
);
Parameters

Parameter

Description

varFileName

[in] A string specifying the path and name of the picture file to load.

lplpdispPicture

[in] The location that receives a pointer to the IPictureDisp object.

Return Value

This method returns standard COM error codes as defined in winerror.h in addition to the following values.

Return code

Description

S_OK

The method completed successfully.

CTL_E_INVALIDPICTURE (0x800A01E1)

Invalid picture file.

Remarks

Recognized graphic formats include bitmap (.bmp), JPEG (.jpg), GIF (.gif), and PGN (.png) files.

See Also

Concepts

Tags :


Community Content

Tycho
PNG support

It seems this function does not support the PNG format or only supports a few formats of the PNG format. It also says 'PGN' instead of ''PNG'!

Final, the first parameter is a variant, the description of the type can be found here http://msdn.microsoft.com/en-us/library/ms221627.aspx


Page view tracker