IiopObjectGetHost Function

Action

Retrieves the IP address of the host where a specified CORBA object is located.

Include file

IIOP.bdh

Syntax

IiopObjectGetHost( in  hIiop     : number,
                   out sHost     : string,
                   in  nHostSize : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object.
sHost String receiving the IP address of the host where the CORBA object is located.
nHostSize Size of the string receiving the IP address (optional).

Example

dcltrans
  transaction TMain
  const
    HOST   := "192.168.20.21"; // server
    PORT   := 1052;            // port
    KEY    := "...\h00";       // key
    KEYLEN := 4;               // key length
  var
    hIiop, nPort            : number;
    sHost, sKey, sInterface : string;
  begin
    IiopSetMaxGiopVersion("1.2");
    IiopSetByteOrder(IIOP_BIG_ENDIAN);
    IiopObjectCreate(hIiop, "IDL:DemoObject:1.0", "1.2", HOST, PORT, KEY, KEYLEN);

    // retrieve information about object
    IiopObjectGetHost(hIiop, sHost);
    nPort := IiopObjectGetPort(hIiop);
    IiopObjectGetKey(hIiop, sKey);
    IiopObjectGetInterface(hIiop, sInterface);
    IiopObjectRelease(hIiop);
  end TMain;

Sample scripts

AnyDemo.bdf

You can find the sample script(s) here: <Public documents>\Silk Performer <version>\Samples\Corba