IiopGetTypecode Function

Action

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

Include file

IIOP.bdh

Syntax

IiopGetTypecode( in  hIiop       : number,
                 out sBuffer     : string optional,
                 in  nBufferSize : number optional,
                 out nBufferLen  : number optional): number;

Return value

Type code. This can be any of the following:

IIOP_TK_ABSTRACT_INTERFACE IIOP_TK_ALIAS IIOP_TK_ANY
IIOP_TK_ARRAY IIOP_TK_BOOLEAN IIOP_TK_CHAR
IIOP_TK_DOUBLE IIOP_TK_ENUM IIOP_TK_EXCEPT
IIOP_TK_FIXED IIOP_TK_FLOAT IIOP_TK_INDIRECTION
IIOP_TK_LDOUBLE IIOP_TK_LLONG IIOP_TK_LONG
IIOP_TK_NATIVE IIOP_TK_NULL IIOP_TK_OBJREF
IIOP_TK_OCTET IIOP_TK_PRINCIPAL IIOP_TK_SEQUENCE
IIOP_TK_SHORT IIOP_TK_STRING IIOP_TK_STRUCT
IIOP_TK_TYPECODE IIOP_TK_ULLONG IIOP_TK_ULONG
IIOP_TK_UNION IIOP_TK_USHORT IIOP_TK_VALUE
IIOP_TK_VALUEBOX IIOP_TK_VOID IIOP_TK_WCHAR
IIOP_TK_WSTRING    
Parameter Description
hIiop Handle to a CORBA object.
sBuffer Buffer receiving the type code associated with the CORBA object (optional).
nBufferSize Size of the buffer receiving the type code associate with the CORBA object (optional).
nBufferLen Variable receiving the actual size of the type code (optional).

Example

dcltrans
  transaction TMain
  const
    HOST   := "192.168.20.21"; // server
    PORT   := 1052;            // port
    KEY    := "...\h00";       // key
    KEYLEN := 4;               // key length
  var
    hIiop     : number;
    sBuffer   : string;
    nTypecode : number;
  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 "GetInfo"
    IiopRequest(hIiop, "GetInfo");

    // check return parameter
    nTypecode := IiopGetTypecode(hIiop, sBuffer);
    ...
    IiopObjectRelease(hIiop);
  end TMain;

Sample scripts

AnyDemo.bdf, Conf.bdf

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