Client registration methods, Client registration methods 14 – Watlow ANAWIN 3 User Manual

Page 17

Advertising
background image

OLE Reference

AnaWin3 Quickstart Guide

14

Watlow Anafaze

Doc.# 22852-10

ure of loading the recipe to the controller can be determined
by calling RecipeLoadStatus passing in the value returned in
DownloadID. Otherwise some error occurred (indicated by
the return value) and the recipe download was aborted.

1   (%/%  /  )

Returns the status of the recipe download or SetChannelData-
Values assigned to the DownloadID passed in. Possible re-
turn values are:

%/  

(9) - Download not yet complete

+%3 

(11) - No download has been as-

signed the passed in DownloadID or the status of this down-
load has already been read.

%1  

(12)

%!

(13)

Once the status of a download has been obtained, subsequent
calls to RecipeLoadStatus will return AWNoDownloadIn-
Progress(11).

1 %(+  .  )

Fills the RecipeName argument with the name of the last rec-
ipe downloaded to the controller(s).

Client Registration Methods

    ( 24  24 )
,    ( &  1)

The AnaWin3 ACTIVEX Server allows (and encourages) cli-
ents to register themselves so that AnaWin3 can keep track of
them. This allows AnaWin3 to notify clients when a local user
shuts it down. Once the local user has shut AnaWin3 down, it
will no longer respond to client requests with meaningful data.
All queries will be responded to with the value AWShutDown
(1). However, AnaWin3 can not completely shut down until
all references to it are relinquished.

The RegisterAsClient and UnRegisterAsClient methods allow
AnaWin3 to notify all clients when a user has shut it down, so
they can relinquish their references to the server and it can
shutdown. It should be noted that if a user shuts down
AnaWin3, it can not be restarted until all clients have closed
their references to it.

To use the registration facility, the client must pass an object
to the RegisterAsClient function that exposes a ShutDown
method that AnaWin3 may call when it is shut down. Regis-
terAsClient returns a long integer value that the client can save
as it’s client ID. If the client wishes to shutdown before

Advertising