IiopSetOctetSequence Function

Action

Associates a octet sequence 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

IiopSetOctetSequence( in hIiop      : number,
                      in sBuffer    : string allownull,
                      in nBufferLen : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object.
sBuffer Buffer containing the octet sequence that will be associated with the CORBA object.
nBufferLen Number of bytes that are associated with the CORBA object (optional). If specified, make sure to set nBufferLen <= StrSize(sBuffer).

Example

dcltrans
  transaction TSetOctetSequence
  const
    HOST   := "192.168.20.21"; // server
    PORT   := 1052;            // port
    KEY    := "...\h00";       // key
    KEYLEN := 4;               // key length
  var
    hIiop   : number; // handle to CORBA object
    sBuffer : 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);

    // initialize buffer
    ...   

    // pass parameter to request
    IiopSetOctetSequence(hIiop, sBuffer);

    // call request "Print" to print data
    IiopRequest(hIiop, "Print", IIOP_ONEWAY);
    IiopObjectRelease(hIiop);
  end TSetOctetSequence;