IiopGetString Function

Action

Retrieves a string return parameter from a CORBA object. This function can be used to get the return parameters of an operation.

Include file

IIOP.bdh

Syntax

IiopGetString( in  hIiop       : number,
               in  sBuffer     : string optional,
               in  nBufferSize : number optional,
               out nStringLen  : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object
sBuffer Buffer receiving the string associated with the CORBA object (optional).
nBufferSize Size of the buffer receiving the string (optional). If specified, make sure to set nBufferSize <= StrSize(sBuffer).
nStringLen Variable receiving the length of the string retrieved (optional)

Example

dcltrans
  transaction TGetString
  const
    HOST   := "192.168.20.21"; // server
    PORT   := 1052;            // port
    KEY    := "...\h00";       // key
    KEYLEN := 4;               // key length
  var
    hIiop : number; // Handle to CORBA object
    sUpper : string;
  begin
    IiopSetMaxGiopVersion("1.2");
    IiopSetByteOrder(IIOP_BIG_ENDIAN); 
    // retrieve handle to server
    IiopObjectCreate(hIiop, "IDL:DemoObject:1.0", "1.2",
    HOST, PORT, KEY, KEYLEN);

    // call request "ToUpper" with string parameter
    IiopSetString(hIiop, "Convert To Uppercase");
    IiopRequest(hIiop, "ToUpper");

    // retrieve string return parameter
    IiopGetString(hIiop, sUpper);
    write("converted string = "); write(sUpper); writeln;
    IiopObjectRelease(hIiop);
  end TGetString;

Output

converted string = CONVERT TO UPPERCASE

Sample scripts

UnivB.bdf, AnyDemo.bdf, TypeTest.bdf, AsyncOdb.bdf, Conf.bdf, Odb.bdf

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