IOleLink::SetUpdateOptions (Windows CE 5.0)
This method specifies how often a linked object should update its cached data.
HRESULT SetUpdateOptions(DWORDdwUpdateOpt);
Parameters
- dwUpdateOpt
[in] Value that specifies how often a linked object should update its cached data. The legal values for dwUpdateOpt are taken from the enumeration OLEUPDATE.
Return Values
This method supports the standard return value E_INVALIDARG.
If the method succeeds, the return value is S_OK.
Remarks
The default update option is OLEUDPATE_ALWAYS. The linked object's implementation of the IPersistStorage::Save method saves the current update option.
If OLEUDPATE_ALWAYS is specified as the update option, the linked object updates the link's caches in the following situations:
- When the update option is changed from manual to automatic, if the link source is running.
- Whenever the linked object binds to the link source.
- Whenever the link source is running and the linked object's IOleObject::Close, IPersistStorage::Save, or IAdviseSink::OnSave implementation is called.
For both manual and automatic links, the linked object updates the cache whenever the container application calls the IOleObject::Update or IOleLink::Update method.
Notes to Callers
Your container application should call IOleLink::SetUpdateOptions when the user changes the update option for a linked object.
The user selects the update option for a linked object using the Links dialog box.
If you use the OleUIEditLinks function to display this dialog box, you must implement the IOleUILinkContainer interface.
The dialog box calls your IOleUILinkContainer::SetLinkUpdateOptions method to specify the update option chosen by the user.
Your implementation of this method should call the IOleLink::SetUpdateOptions method to pass the selected option to the linked object.
To determine whether the platform supports this interface, see Determining Supported COM APIs.
Requirements
OS Versions: Windows CE 3.0 and later.
Header: Oleidl.h, Oleidl.idl.
Link Library: Ole32.lib, Uuid.lib.
See Also
IAdviseSink::OnSave | IOleLink::Update | IOleObject::Close | IOleObject::Update | IPersistStorage::Save | OLEUPDATE
Send Feedback on this topic to the authors