Click to Rate and Give Feedback
MSDN
MSDN Library
COM
 OleLoadPictureFile
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Component Automation
OleLoadPictureFile

Creates an IPictureDisp object from a picture file on disk.

HRESULT OleLoadPictureFile(
  VARIANT     varFileName,
  LPDISPATCH  *lplpdispPicture
);

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.

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.

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

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
PNG support      Tycho   |   Edit   |   Show History

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

Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker