|
|
Initialize the control and load the Windows Sockets library.
Syntax
object.Initialize([LicenseKey],
[ModuleName], [Options], [Reserved])
Remarks
This method explicitly loads and initializes the Windows Sockets
library. Typically this is not required because it's done
automatically when any action is taken that requires network
access, such as attempting a connection to a remote host.
- LicenseKey
- A string which 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.
- ModuleName
- A string which specifies the full pathname of the Windows
Sockets library loaded by the control. Setting the argument to the
name of an appropriate library causes it to be loaded. If this
argument is not specified, or an empty string is passed as the
value, the default system Windows Sockets library is loaded.
- Options
- An argument reserved for future use. This argument should not
be specified.
- Reserved
- An argument reserved for future use. This argument should not
be specified.
Return Value
A value of zero is returned if the library was initialized
successfully. Otherwise, a non-zero error code is returned which
indicates the cause of the failure.
Example
'
' Create an instance of the ActiveX control
'
Set fingerClient = CreateObject("SocketTools.FingerClient.6")
'
' Initialize the control using the specified runtime
' license key; if the key is not specified, the
' development license will be used
'
nError = fingerClient.Initialize(CSTOOLS6_LICENSE_KEY)
If nError <> 0 Then
MsgBox "Unable to initialize SocketTools component"
End
End If
See Also
Uninitialize Method
|
|