Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function saves an object opened in transacted mode into the specified storage object.
WINOLEAPI OleSave( IPersistStorage * pPS, IStorage * pStg, BOOL fSameAsLoad );
Parameters
Return Values
This function can also return any of the error values returned by the IPersistStorage::Savemethod.
Remarks
Passing into this function any invalid and, under some circumstances, NULL pointers will result in unexpected termination of the application.
The OleSavehelper function handles the common situation in which an object is open in transacted mode and is then to be saved into the specified storage object which uses the OLE-provided compound file implementation. Transacted mode means that changes to the object are buffered until either of the IStoragemethods Commitor Revertis called. Callers can handle other situations by calling the IPersistStorageand IStorageinterfaces directly.
OleSavedoes the following:
Note Static objects are saved into a stream called CONTENTS. Static metafile objects get saved in "placeable metafile format" and static DIB data gets saved in "DIB file format." These formats are defined to be the OLE standards for metafile and DIB. All data transferred using an IStreaminterface or a file transferred using IDataObject::GetDataHeremust be in these formats. Also, all objects whose default file format is a metafile or DIB must write their data into a CONTENTS stream using these standard formats.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Ole2.h | Ole232.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.