Opening the object server, Opening a network, Opening the – Echelon LNS User Manual

Page 73: Object server, Opening a network on

Advertising
background image

LNS Programmer's Guide

59

Opening the Object Server

Once you have set the network access mode, and licensing mode for your Lightweight

client application, you can open the Object Server, as shown below:

ObjectServer.Open()

NOTE: If you will be opening any networks with an LNS application that is running as a

Windows service, then the first application to open the LNS Object Server must also be
running as a Windows service. In addition, if a network is to be opened by an LNS

application that is running as Windows service, then that network and system must be

opened by an LNS application that is running as Windows service before it is opened
with an LNS application running as a user process. For more information on this, consult
the help pages for the Open() methods of the Network and ObjectServer objects in

the LNS Object Server Reference help file.

Opening a Network

This section describes how to connect to a network with a Lightweight client application.

Lightweight client applications cannot create new networks. The LNS Server utility

must be running on the PC containing the LNS databases (i.e. the LNS Server PC) to
open a network with a Lightweight client application. To connect to an existing network

with a Lightweight client application, follow these steps:

1. Retrieve

the

Networks collection from the ObjectServer object’s

Networks property. The Networks collection will contain all Lightweight

client networks that have been entered into the Windows Registry on the
PC running your application (i.e. all the networks that have previously

been opened on your PC).

Dim MyNetworks as LcaNetworks

Set MyNetworks = ObjectServer.Networks

Advertising