Legend – Echelon LNS Plug-in User Manual

Page 38

Advertising
background image

5. If the plug-in has not set the MultiObject value in the Windows registry to 1, release the reference

to it. SingleInstance functionality is described in Implementing the Plug-in Object Class in
Chapter 2.

The director holds a reference to the plug-in so that it can send additional objects (in the case of
MultiObject support) or can activate the existing instance (in the case of SingleInstance support). In
these two cases, the director will always keep a reference to the plug-in until the director has
terminated, or explicitly released the plug-in (for example, you can use the Plug-in Registration
dialog in the LonMaker tool to deregister plug-ins).

Note that you can create a new process for each plug-in instance by overriding the PluginFactory base
class.

The following diagram illustrates the interaction between MultiObject, SingleInstance, and the COM
factory’s MULTIPLEUSE and SINGLEUSE flags.

Process exits when its plug-in is closed and released by the Director.

Process exits when all plug-ins are closed and released by the Director.

Process exits when all plug-ins are closed.

Process exits when its plug-in is closed and released by the Director.

Processes exit when their plug-in is closed and released by the Director.

Processes exit when their plug-in is closed.

MULTIPLEUSE

SINGLEUSE

SingleInstance +

MultiOb

ject

SingleInstance

+ !MultiObje

ct

!SingleI

n

s

ta

nc

e (+ !

M

ultiObje

ct

)

Handles ALL commands for ALL objects.

Handles ALL commands for ALL objects.

Handles ONE

command for ONE

object/command

pair.

Handles ONE

command for ONE

object/command

pair.

Handles ONE

command for ONE

object/command

pair.

Handles ONE

command for ONE

object/command

pair.

Handles ONE

command for ONE

object/command

pair.

Handles ONE

command for ONE

object/command

pair.

Handles ONE

command for ONE

object/command

pair.

Handles ONE

command for ONE

object/command

pair.

Handles ALL

commands for

ONE object/

command pair.

Handles ALL

commands for

ONE object/

command pair.

Handles ALL

commands for

ONE object/

command pair.

Handles ALL

commands for

ONE object/

command pair.

Legend:

COM Server Process

Plug-In Instance

(COM Object)

Advertising