Partager via


IOleLink::BindIfRunning

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method activates the connection between the linked object and the link source if the link source is already running.

Syntax

HRESULT BindIfRunning(void);

Parameters

None.

Return Value

The following table shows the return values for this method.

Value Description

S_OK

The link source was bound.

S_FALSE

The link source is not running.

CreateBindCtx, IMoniker::IsRunning, or IOleLink::BindToSource errors

Binding the moniker might require calling these functions, therefore, errors generated by these functions can be returned.

Remarks

You typically do not need to call IOleLink::BindIfRunning. This method is primarily called by the linked object.

The linked object's implementation of IOleLink::BindIfRunning checks the Running Object Table (ROT) to determine whether the link source is already running.

It checks both the relative and absolute monikers.

If the link source is running, IOleLink::BindIfRunning calls IOleLink::BindToSource to connect the linked object to the link source.

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

Requirements

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

See Also

Reference

CreateBindCtx
IMoniker::IsRunning
IOleLink::BindToSource