Datasnap.Win.ObjBrkr.TSimpleObjectBroker.GetComputerForProgID

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetComputerForProgID(const ProgID): string; override;

C++

virtual System::UnicodeString __fastcall GetComputerForProgID(const void *ProgID);

Properties

Type Visibility Source Unit Parent
function public
Datasnap.Win.ObjBrkr.pas
Datasnap.Win.ObjBrkr.hpp
Datasnap.Win.ObjBrkr TSimpleObjectBroker

Description

Returns a string that identifies an available server machine.

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.

See Also