IiopGetReplyDataLen Function

Action

Retrieves the size of the reply associated with a CORBA object after an IiopRequest function call.

Include file

IIOP.bdh

Syntax

IiopGetReplyDataLen( in  hIiop    : number,
                     out nDataLen : number,
                     in  nAlign   : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object
nDataLen Variable receiving the size of the reply associated with a CORBA object
nAlign

Reply data alignment (optional). Possible options are:

  • IIOP_ALIGN_2. Alignment to 2-byte boundaries

  • IIOP_ALIGN_4. Alignment to 4-byte boundaries

  • IIOP_ALIGN_8. Alignment to 8-byte boundaries

  • IIOP_ALIGN_16. Alignment to 16-byte boundaries

Default setting is alignment to 1-byte boundaries.

Example

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

   // call request "ToLower" with string parameter
    IiopSetString(hIiop, "CONVERT TO LOWERCASE");
    IiopRequest(hIiop, "ToLower");

    // retrieve length of return parameters
    IiopGetReplyDataLen(hIiop, nLen);
    write("length = "); write(nLen); writeln;

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

Output

length = 21converted string = convert to lowercase