Initialize Method

Initialize the component and load the Remote Access Services library.

Syntax

object.Initialize([license] [,options] [,reserved])

Return Type

Integer

Remarks

The Initialize method explicitly initializes the control and loads the Remote Access Services library. Typically this is not required because it's done automatically when the control is loaded.

The license argument specifies a runtime license key used to initialize the control. Normally this argument is not needed, since the appropriate license key is used when an instance of the control is created. However, if an instance of the control is created using the CreateObject function, the Initialize method must be called with a valid runtime license key. If the license key is omitted or passed as an empty string, a development license must be installed on the local system.

The options and reserved arguments are unused and should not be specified.

A value of zero is returned if the control was initialized successfully. Otherwise, a non-zero error code is returned which indicates the cause of the failure.

Example

  '
  ' Create an instance of the Dialer ActiveX control
  '
  Set rasDialer = WScript.CreateObject("SocketTools.Dialer.6")
  '
  ' Initialize the control, using the specified runtime license
  ' key; if the key is not specified, the development license
  ' will be used
  '
  nError = rasDialer.Initialize(CSTOOLS6_LICENSE_KEY) 
  If nError <> 0 Then
      WScript.Echo "Unable to initialize the SocketTools component"
      WScript.Quit(1)
  End If

See Also

Uninitialize Method