Connect to the remote OPC Server with the specified CLSID on the specified machine.
An instance of the OPC COM server is created. The server is launched if it is not already running in the same user. If different applications access the same OPC server then you need to configure DCOM so that all applications launch the OPC server under the same user. Otherwise multiple instances of the OPC server are created.
The method overload has the advantage that OpcEnum on the remote machen needs not be accessed to find the CLSID of the OPC server to be connected.
The Disconnect method needs to be called to release the OPC server before the client program exits.
Visual Basic (Declaration) | |
---|---|
Public Overloads Function Connect( _ ByVal ComputerName As String, _ ByVal ClsidOPCserver As Guid _ ) As Integer |
C# | |
---|---|
public int Connect( string ComputerName, Guid ClsidOPCserver ) |
Parameters
- ComputerName
- Network computer name
- ClsidOPCserver
- CLSID of the server