OleLoadPictureFileEx function
Loads a picture from a file.
Syntax
HRESULT OleLoadPictureFileEx( _In_ VARIANT varFileName, _In_ DWORD xSizeDesired, _In_ DWORD ySizeDesired, _In_ DWORD dwFlags, _Out_ LPDISPATCH *lplpdispPicture );
Parameters
- varFileName [in]
-
The path and name of the picture file to load.
- xSizeDesired [in]
-
The desired length for the picture to be displayed.
- ySizeDesired [in]
-
The desired height for the picture to be displayed.
- dwFlags [in]
-
The desired color depth for the icon or cursor. Together with the desired size it is used to select the best matching image.
- lplpdispPicture [out]
-
The location that receives a pointer to the picture.
Return value
This method returns standard COM error codes in addition to the following values.
| Return code | Description |
|---|---|
|
The method completed successfully. |
|
varFileName is not valid. |
Remarks
Recognized graphic formats include bitmap (.bmp), JPEG (.jpg), GIF (.gif), and PGN (.png) files.
Requirements
|
Header |
|
|---|---|
|
Library |
|
|
DLL |
|