IiopSetValueIndirect Function

Action

Associates a value type indirection parameter with a CORBA object. This function can be used to set the parameters of a request in advance of calling the IiopRequest function.

Include file

Iiop.bdh

Syntax

IiopSetValueIndirect( in hIiop    : number,
                      in nValueId : number ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object.
nValueId ID of the value that is indirected to.

Example

dcltrans
  transaction TSetValue
  const
    HOST        := "192.168.20.21"; // server
    PORT        := 1052;            // port
    KEY         := "...\h00";       // key
    KEYLEN      := 4;               // key length
    REP_ID      := "IDL:SetValueType:1.0";
    REP_ID_LIST := " IDL:DerivedValue:1.0 IDL:BaseValue:1.0 IDL:AbstractValue:1.0";
    CODE_BASE   := "www.codebase.com";
  var
    hIiop : number; // Handle to CORBA object
  begin
    IiopSetMaxGiopVersion("1.2");
    IiopSetByteOrder(IIOP_BIG_ENDIAN);

    // retrieve handle to server
    IiopObjectCreate(hIiop, "IDL:DemoObject:1.0", "1.2", HOST, PORT, KEY, KEYLEN);

    // set value
    IiopSetValue(hIiop, REP_ID, "", FALSE, 1);
    IiopSetLong(hIiop, 5);    IiopEndValue(hIiop);

    // set another value
    IiopSetValue(hIiop, REP_ID_LIST, CODE_BASE, TRUE);
    IiopSetBoolean(hIiop, TRUE);
    IiopSetLong(hIiop, 3);
    IiopSetValueIndirect(hIiop, 1);
    IiopSetString(hIiop, "This is a string");
    IiopEndValue(hIiop);

    // call request "SetValue"
    IiopRequest(hIiop, "SetValue");
    IiopObjectRelease(hIiop);
  end TSetValue;