IiopSetString Function

Action

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

Include file

IIOP.bdh

Syntax

IiopSetString( in hIiop   : number,
               in sString : string
               in nFlags  : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object.
sString String that will be associated with the CORBA object.
nFlags If the string should be set as wide string set this parameter to IIOP_USE_WCHAR (optional).

Example

dcltrans
  transaction TSetString
  const
    HOST   := "192.168.20.21"; // server
    PORT   := 1052;            // port
    KEY    := "...\h00";       // key
    KEYLEN := 4;               // key length
  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);

    // pass string parameter to request
    IiopSetString(hIiop, "Hello world!");

    // call request "Write" with string parameter
    IiopRequest(hIiop, "Write", IIOP_ONEWAY);
    IiopObjectRelease(hIiop);
  end TSetString;

Sample scripts

UnivB.bdf, AnyDemo.bdf, AsyncBank.bdf, Bank.bdf, SimpleAsyncBank.bdf, TypeTest.bdf, AsyncFact.bdf, AsyncOdb.bdf, Conf.bdf, Factory.bdf, Odb.bdf, Vbrokerbank01.bdf, Vbrokerbank02.bdf, VBrokerBankGate.bdf

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