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. For more information, see the Win32 Programmer's Reference.
HRESULT SaveAsFile(
IStream * pstream,
//Pointer to stream where picture writes its data
BOOL fSaveMemCopy ,
//Indicates whether to save the picture in memory
LONG* pcbSize //Receives a pointer to the number of bytes written
//to stream
);
This method supports the standard return values E_FAIL and E_INVALIDARG, as well as the following:
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in ocidl.h.