Initialize an instance of the SocketWrench class.
A boolean value which specifies if the class was initialized successfully.
The Initialize method can be used to explicitly initialize an instance of the SocketWrench class, loading the networking library and allocating resources for the current thread. Typically an application would define the license key as a custom attribute, however this method can be used to initialize the class directly.
The runtime license key for your copy of SocketWrench can be generated using the License Manager utility that is included with the product. Note that if you have installed an evaluation license, you will not have a runtime license key and cannot redistribute any applications which use the SocketWrench class.
The following example shows how to use the Initialize method to initialize an instance of the class. This example assumes that the license key string has been defined in code.
[CS]
SocketTools.SocketWrench socket = new SocketTools.SocketWrench();
if (socket.Initialize(strLicenseKey) == false)
{
MessageBox.Show(socket.LastErrorString, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}
[Visual Basic]
Dim Socket As New SocketTools.SocketWrench
If Socket.Initialize(strLicenseKey) = False Then
MsgBox(Socket.LastErrorString, vbIconExclamation)
Exit Sub
End If
SocketWrench Class | SocketTools Namespace | SocketWrench.Initialize Overload List | RuntimeLicenseAttribute Class | Uninitialize Method