OleLoadPictureFile
Collapse the table of content
Expand the table of content

OleLoadPictureFile function

Creates an IPictureDisp object from a picture file on disk.

Syntax


HRESULT OleLoadPictureFile(
  _In_  VARIANT    varFileName,
  _Out_ LPDISPATCH *lplpdispPicture
);

Parameters

varFileName [in]

The path and name of the picture file to load.

lplpdispPicture [out]

The location that receives a pointer to the IPictureDisp object.

Return value

This method returns standard COM error codes in addition to the following values.

Return codeDescription
S_OK

The method completed successfully.

CTL_E_INVALIDPICTURE

Invalid picture file.

 

Remarks

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

Requirements

Header

OleCtl.h

Library

OleAut32.lib

DLL

OleAut32.dll

 

 

Show:
© 2016 Microsoft