Export (0) Print
Expand All

IOleClientSite::SaveObject method

Saves the embedded object associated with the client site. This function is synchronous; by the time it returns, the save will be completed.

Syntax


HRESULT SaveObject();

Parameters

This method has no parameters.

Return value

This method returns S_OK on success. Other possible return values include the following.

Return codeDescription
E_FAIL

The operation has failed.

 

Remarks

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

Calls to SaveObject occur in most implementations of IOleObject::Close. Normally, 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 an end 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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OleIdl.h

IDL

OleIdl.Idl

IID

IID_IOleClientSite is defined as 00000118-0000-0000-C000-000000000046

See also

IOleClientSite
IOleObject::Close

 

 

Community Additions

ADD
Show:
© 2014 Microsoft