dOPC Client Toolkit
Close
dOPCComn.TdOPCServerBrowser.FindServer

FindServer searches the passed ServerName in the Items collection.

function FindServer(ServerName: string): integer;
__fastcall int FindServer(AnsiString ServerName);

Returns the index if a match is found, otherwise 0.

procedure TForm1.Button1Click(Sender: TObject); var Index : integer; begin Index := dOPCServerBrowser1.FindServer('FactorySoft.Example.Alarm.1'); if Index >= 0 then //if exists begin ShowMessage(dOPCServerBrowser1.Items[index].ServerCaption); end else ShowMessage('not found'); end;
Kassl GmbH Copyright © 2024. All rights reserved.