dOPC Client Toolkit

FindByClassId searches the passed ClassId in the Items collection.

function FindByClassId(ClassId: string): integer;
__fastcall int FindByClassId(AnsiString ClassId);

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

procedure TForm1.Button1Click(Sender: TObject); var Index : integer; begin Index := dOPCServerBrowser1.FindByClassID('{D64E68EE-BB58-47A5-A565-57F36C0B4A20}'); if Index >= 0 then //if exists begin ShowMessage(dOPCServerBrowser1.Items[index].ServerCaption); end else ShowMessage('not found'); end;
Kassl GmbH Copyright © 2023. All rights reserved.