dOPC Client Toolkit Help file
TdOPCSvr.Connect Method
C++
public: __fastcall Connect(
    AnsiString aServerName, 
    AnsiString aComputerName = ''
);
C#
public Connect(
    String aServerName, 
    String aComputerName
);
Visual Basic
Public Sub Connect(
    aServerName As String, 
    aComputerName As String = ''
)

Connect establishes a connection to an OPC DA server.

The aServerName parameter contains the string that uniquely identifies the registered OPC Data Access server (that implements the custom interface). The aComputerName parameter contains the name that specifies another computer to connect to using DCOM. Acceptable computer names are UNC names ("Server") or DNS names ("server.com", "www.vendor.com" or "180.151.19.75"). An empty string establishes a connection on the local computer. Calling this function will result in the automation wrapper calling CoCreateInstanceEx to create a Data Access custom server (aServerName) on the specified machine (aComputerName). If this function is called a second time without explicitly calling Disconnect, the component will automatically disconnect the existing connection.

What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.