Up until now, it has been assumed that the only user of your application is you, and that you have programmer access and the XUPROGMODE key in the account where your RPCs are accessed.
Under any other circumstance, any RPCs that your application uses must be registered for use by your application on the host system. Registration authorizes the RPC(s) for use by your client based on user privileges.
To register the RPCs used by the tutorial application:
procedure TForm1.FormCreate(Sender: TObject);
var ServerStr: String;
PortStr: String;
begin
TermTypeList:=TStringList.Create;
// get the correct port and server from Registry
if GetServerInfo(ServerStr,PortStr)<> mrCancel then
begin {connectOK}
RPCBroker1.Server:=ServerStr;
RPCBroker1.ListenerPort:=StrToInt(PortStr);
// establish a connection to the RPC Broker server
try
RPCBroker1.Connected:=True;
// Check security
if not RPCBroker1.CreateContext('ZxxxTT TERMTYPE') then
Application.Terminate;
except
On EBrokerError do
begin {error}
ShowMessage('Connection to server could not be established!');
Application.Terminate;
end; {error}
end; {try}
end {connectOK}
else
Application.Terminate;
end;