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.
Concepts