OleSavePictureFile function (olectl.h)

Saves a picture to a file.

Syntax

WINOLECTLAPI OleSavePictureFile(
  [in] LPDISPATCH lpdispPicture,
  [in] BSTR       bstrFileName
);

Parameters

[in] lpdispPicture

Points to the IPictureDisp picture object.

[in] bstrFileName

The name of the file to save the picture to.

Return value

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

Return code Description
S_OK
The method completed successfully.
CTL_E_INVALIDPROPERTYVALUE
lpdispPicture is NULL.
CTL_E_FILENOTFOUND
bstrFileName cannot be found.

Requirements

Requirement Value
Target Platform Windows
Header olectl.h
Library OleAut32.lib
DLL OleAut32.dll