UpdateLicense Method


Apply license code and licensee's name to server.

long UpdateLicense(
	[in] BSTR LicenseKey, 
	[in] BSTR Licensee
)

Parameters

LicenseKey

License code of server.

Licensee

Name of the licensee.

Return Value

Return value is zero if this method succeeds; otherwise return value is non-zero.

Usage Example

Dim server, user, password, requestAddr
server = "localhost"
user = "system"
password = "mypassword"
requestAddr = "192.168.0.1"

Dim oSvr
Set oSvr = CreateObject("EmailArchitectObjects.ServerRoot")
r = oSvr.Connect( server, user, password, 0, requestAddr )
If r <> 0 Then
  WScript.Echo( "connect server failed!" )
  WScript.Quit
End If

Dim oLicense
Set oLicense = oSvr.License

Dim licensekey, licensee

licensekey = "my license code"
licensee = "AdminSystem Software Limited"

If oLicense.UpdateLicense( licensekey, licensee ) <> 0 Then
	WScript.Echo( "invalid license key" )
End If