D2000 VBApi - Establishing and closing connection with D2000 system
Before calling the procedures, that communicate with the system kernel (the
process
D2000 Server), it is
necessary to connect them. The connection includes two operations:
creating a communication route
user logon
These operations are provided by the procedure VBApiLogOn.
Declaration
Declare Sub VBApiLogOn Lib "vbapi.dll" Alias "_LogOn@24" (ByRef server As String, ByRef procDesc As String, ByRef name As String, ByRef pass As String, ByRef wdFreq As Long, ByRef ok As Long)
Parameters
server
To create a communication route, it is necessary to know the name of the
computer with running process
D2000 Server (the parameter server). The meaning
of this parameter is the same as the meaning of the parameter
/S given on the command line during the start of a standard client process of
the system.
procDesc
In older versions (4.10 and older), the parameter specified a name of the
client process, with which the interface connects to the system, with the
automatic extension .API. The parameter substituted the parameter
/W
from the command line.
Since the version 4.10, the parameter is informative only. The value of the parameter is stored into the
log
database of the system during the process start (suitable for the interface
identification for the debug purposes). The process name, with which the
interface connects to, is generated automatically and its structure is:
WsName_XX.VBA.
where:
WsName - name of the computer in the network. The characters in the
computer's name, that do not match the naming convention of objects for D2000,
are substituted by the character _.
XX - value from 00 up to 99
.VBA - process extension (in previous versions - .API)
name
Name of user.
There are to be applied all restrictions of his/her access rights.
pass
User password.
wdFreq
Interval for sending watch
dog messages used for verifying
the communication route
functionality. The parameter substitutes the parameter
/F from the command line.