<< back to sysax.com Product page

2.2. Usage Basics

COM object invocation

The server administration component may be invoked as a COM object with the name "SysaxServer.Admin".

Examples of invocation within VBScript, Javascript, and C# are shown below.

Exhibit 2.2. Example of invocation from VBScript


'invoke the sysax server administration component
Dim admin
Set admin = CreateObject("SysaxServer.Admin")
 

Exhibit 2.3. Example of invocation from Javascript


//invoke the sysax server administration component
var admin = new ActiveXObject("SysaxServer.Admin");
 

Exhibit 2.4. Example of invocation from c#


//invoke the sysax server administration component
Type admin        = Type.GetTypeFromProgID("SysaxServer.Admin"); 
object myObject = Activator.CreateInstance(admin); 
 

Local and Remote Access

Both local and remote installations of Sysax server can be managed using the server administration component. For remote server management, the IP address of the remote host must be specified. The admin username and password is required for remote access but is optional for local access.

Exhibit 2.5. IDL Definition of methods to specify admin host IP address, username and password


  HRESULT AdminHost([in] BSTR b_hostname);
  HRESULT AdminUser([in] BSTR b_username);
  HRESULT AdminPass([in] BSTR b_password);
 

Exhibit 2.6. Example usage of methods to specify admin host IP address, username and password


'set host IP address to access and manage sysax server running on a remote machine
'set to empty string for local access
admin.AdminHost = ""

'set admin username and password
admin.AdminUser = "test"
admin.AdminPass = "test"