Associates a parameter containing binary data with a CORBA object. This function can be used to set parameters of a request in advance of calling the IiopRequest function.
IIOP.bdh
IiopSetBinary( in hIiop : number, in sBuffer : string, in nBufferLen : number optional, in nAlign : number optional): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
hIiop | Handle to a CORBA object |
sBuffer | Buffer containing the binary data that will be associated with the CORBA object |
nBufferLen |
Number of binary data bytes that are associated with the CORBA object (optional). If specified, make sure to set nDataLen <= size of sBuffer |
nAlign |
Binary data alignment (optional). Possible options are:
Default setting is alignment to 1-byte boundaries. In addition, the byte order within the binary data can be specified:
|
dcltrans transaction TSetBinary 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(512); begin IiopSetMaxGiopVersion("1.0"); 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 IiopSetBinary(hIiop, sBuffer, STRING_COMPLETE, IIOP_ALIGN_16 | IIOP_BIG_ENDIAN); // call request "Print" to print data IiopRequest(hIiop, "Print", IIOP_ONEWAY); IiopObjectRelease(hIiop); end TSetBinary;
AnyDemo.bdf, Conf.bdf, DynAny.bdf
You can find the sample script(s) here: <Public documents>\Silk Performer <version>\Samples\Corba