dOPC Client Toolkit Help file
TdOPCSvr.ComputerName Property
C++
__published: __property AnsiString ComputerName;
C#
String ComputerName;
Visual Basic
Property ComputerName() As String

ComputerName contains the name of the server to which the client is connected via the Connect method.

It may be an empty string (default) if the OPC server runs on the same computer the client is running on. This property is only used for COM based OPC servers (Protocol = coCOM) and it is ignored if the Protocol is coXML. Before a connection to a remote OPC DA server can be established, DCOM needs to be configured on both client and server. 

Client: 

Call the dOPCInitSecurity method (unit dOPCCom) at the at the beginning of your client program. 

Server: 

To configure the remote OPC server and to understand the dOPCInitSecurity method background please read http://www.opcactivex.com/Support/DCOM_Config/dcom_config.html or http://itcofe.web.cern.ch/itcofe/Services/OPC/GettingStarted/DCOM/RelatedDocuments/ITCODCOMSettings.pdf.

Client

procedure TForm1.FormCreate(Sender: TObject);
begin
  dOPCInitSecurity;
end;

Server

var
  Server : TdOPCServer;
begin
  Server := TdOPCServer.Create(nil);
  Server.ServerName := 'Matrikon.OPC.Simulation';
  Server.ComputerName := '\\RemotePC';
  Server.Active := true;
end;
What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.