RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSimpleObjectBroker.GetComputerForProgID Method

Returns a string that identifies an available server machine.

Pascal
function GetComputerForProgID(const ProgID): string; override;
C++
virtual __fastcall AnsiString GetComputerForProgID(const  ProgID);

Call GetComputerForProgID to obtain the name of an available server machine. The ProgID parameter (which specifies the desired server interface) is ignored. 

TSimpleObjectBroker returns the ComputerName property of an available server from the Servers property. If the LoadBalanced property is true, this server is chosen at random from available servers. If the LoadBalanced property is false, this server is the first available server listed in the Servers property. If no servers are available, GetComputerForGUID raises an EBrokerException exception. 

A server is considered available if its Enabled property is true and its HasFailed property is false. The broker automatically sets HasFailed to false when it is notified of a connection failure for that server. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!