IiopGetOctetSequence Function

Action

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

Include file

IIOP.bdh

Syntax

IiopGetOctetSequence( in  hIiop        : number,
                      out sBuffer      : string optional,
                      in  nBufferSize  : number optional,
                      out nSequenceLen : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object
sBuffer Buffer receiving the octet sequence associated with the CORBA object (optional).
nBufferSize

Size of the buffer receiving the octet sequence (optional). Make sure to set

nBufferSize <= size of sBuffer

nSequenceLen Variable receiving the number of bytes retrieved (optional).

Example

dcltrans
  transaction TGetOctetSequence
  const
    HOST := "192.168.20.21"; // server
    PORT := 1052; // port
    KEY := "...\h00"; // key
    KEYLEN := 4; // key length
  var
    hIiop, nLen : number; // Handle to CORBA object
    sBuffer : string(512);
  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 "GetMsg"
    IiopRequest(hIiop, "GetMsg");

    // retrieve return parameter
    IiopGetOctetSequence(hIiop, sBuffer, STRING_COMPLETE, nLen);
    IiopObjectRelease(hIiop);
  end TGetOctetSequence;