RPC HELP GetServerIP Example

From VistApedia
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

RPC Broker Help Home

GetServerIP Example

The following is example of the GetServerIP function:

   // include the unit RpcConf1 in the Uses clause
   
   // An edit box on the form is assumed to be named edtIPAddress
   
   // Another edit box (edtInput) is used to input a desired server name
   
   uses RpcConf1;
   
   procedure Tform1.Button1Click(Sender: TObject);
   var
     ServerName: string;
   begin
     ServerName := 'forum.med.va.gov';
     edtIPAddress.Text := GetServerIP(edtInput.Text);
     // For Forum.va.gov returns '152.128.1.25'
     // For garbage returns 'Unknown!'
   end;