IPicture::SaveAsFile method (ocidl.h)

Saves the picture's data into a stream in the same format that it would save itself into a file. Bitmaps use the BMP file format, metafiles the WMF format, and icons the ICO format.

Syntax

HRESULT SaveAsFile(
  [in]  LPSTREAM pStream,
  [in]  BOOL     fSaveMemCopy,
  [out] LONG     *pCbSize
);

Parameters

[in] pStream

A pointer to the stream into which the picture writes its data.

[in] fSaveMemCopy

A flag indicating whether to save a copy of the picture in memory.

[out] pCbSize

Pointer to a variable that receives the number of bytes written into the stream. This value can be NULL, indicating that the caller does not require this information.

Return value

This method supports the standard return values E_FAIL, E_INVALIDARG, and S_OK.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ocidl.h

See also

IPicture