IOleUILinkContainer::UpdateLink  .BR5LZ

Forces selected links to connect to their source and retrieve current information.

HRESULT UpdateLink(

    DWORD dwLink,

//Unique 32-bit link identifier

    DWORD fErrorMessage,

//Determines whether or not caller should display error message

    DWORD fReserved

//Reserved

   );

 

 

Parameters

dwLink

[in] Container-defined unique 32-bit identifier for a single link. Containers can use the pointer to the link's container site for this value.

fErrorMessage

[in] Determines whether or not the caller (implementer of IOleUILinkContainer) should show an error message upon failure to update a link. The Update Links dialog box sets this to FALSE. The Object Properties and Links dialog boxes set it to TRUE.

fReserved

[in] Reserved for future use; must be set to FALSE.

 

Return Values

This method supports the standard return values E_FAIL, E_INVALIDARG, and E_OUTOFMEMORY, as well as the following:

S_OK

Successfully updated linked objects.

E_ACCESSDENIED

Insufficient access permissions.

 

Remarks

Notes To Callers

Call this method with fErrorMessage set to TRUE in cases where the user expressly presses a button to have a link updated, that is, presses the Links  Update Now button. Call it with FALSE in cases where the container should never display an error message, that is, where a large set of operations are being performed and the error should be propagated back to the user later, as might occur with the Update links progress meter. Rather than providing one message for each failure, assuming there are failures, provide a single message for all failures at the end of the operation.

Notes To Implementers

For OLE links, call IOleObject::Update.

See Also

IOleObject::Update