Share via


IOleClientSite::SaveObject

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method saves an embedded object.

Syntax

HRESULT SaveObject(void);

Parameters

None.

Return Value

This method supports the standard return value E_FAIL, as well as S_OK, which indicates that the object was saved.

Remarks

An embedded object calls SaveObject to ask its container to save it to persistent storage when a user chooses the File Update or Exit commands. The call is synchronous, meaning that by the time it returns, the save operation is complete.

Calls to SaveObject occur in most implementations of IOleObject::Close.

Usually, when a container tells an object to close, the container passes a flag specifying whether the object should save itself before closing, prompt the user for instructions, or close without saving itself.

If an object is instructed to save itself, either by its container or a user, it calls SaveObject to ask the container application to save the object's contents before the object closes itself.

If a container instructs an object not to save itself, the object should not call SaveObject.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

Header Oleidl.h, oleidl.idl
Library oleaut32.lib, uuid.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IOleClientSite
IOleObject::Close

Concepts

Determining Supported COM APIs