IOleLink::SetUpdateOptions method (oleidl.h)
Specifies how often a linked object should update its cached data.
Syntax
HRESULT SetUpdateOptions(
[in] DWORD dwUpdateOpt
);
Parameters
[in] dwUpdateOpt
Specifies how often a linked object should update its cached data. The possible values for dwUpdateOpt are taken from the enumeration OLEUPDATE.
Return value
This method returns S_OK on success. Other possible return values include the following.
Return code | Description |
---|---|
|
The supplied value is invalid. |
Remarks
Notes to Callers
Your container application should call IOleLink::SetUpdateOptions when the end user changes the update option for a linked object.The end 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 end user. Your implementation of this method should call the IOleLink::SetUpdateOptions method to pass the selected option to the linked object.
Notes to Implementers
The default update option is OLEUDPATE_ALWAYS. The linked object's implementation of IPersistStorage::Save 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 implementations are called.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | oleidl.h |