IiopOrbixDaemonBind Function

Action

Retrieves a handle to the Orbix daemon. This function can be used to get the initial CORBA object, consequently it simplifies Orbix/OrbixWeb-specific bootstrapping.

Include file

IIOP.bdh

Syntax

IiopOrbixDaemonBind( in sHost : string,                     in nPort : number ): number;

Return value

  • Handle to the OrbixWeb daemon if successful

  • 0 if an error occurred

Parameter Description
sHost Orbix host
nPort Orbix port number, OrbixWeb default port number is 1571

Example

dcltrans
  transaction TMain
  const
    ORBIX_HOST := "192.168.20.55"; // Orbix host
    ORBIX_PORT := 1571; // default Orbix port
  var
    hDaemon, hBank: number;
  begin
    // global settings
    IiopSetMaxGiopVersion("1.2");
    IiopSetByteOrder(IIOP_LITTLE_ENDIAN);
    IiopSetPrincipal("principal", Strlen("principal")+1);

    // OrbixWeb bootstrapping
    hDaemon := IiopOrbixDaemonBind(ORBIX_HOST, ORBIX_PORT);

    // get object reference handle to bank object
    hBank := IiopOrbixServerBind(hDaemon, ORBIX_HOST,
                                 "bank", "","bank");

    // release objects
    IiopObjectRelease(hDaemon);
    IiopObjectRelease(hBank);
  end TMain;

Sample scripts

AnyDemo.bdf, AsyncBank.bdf, Bank.bdf, Callback.bdf, SimpleAsyncBank.bdf, TypeTest.bdf

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