Retrieves binary data from a specified attribute of the user.
User attributes are useful when working with Silk Performer frameworks, in fact, when the user behavior is defined in two separate script. In that case, user attributes enable the exchange of data between scripts, for example, between a Silk Performer and a Java script.
Kernel.bdh
AttributeGetBinary( in sName : string, out sBuffer : string, in sBufferSize : number optional, out nDataLen : number optional ): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
sName | Name of the attribute of which the value is retrieved. |
sBuffer | Buffer receiving the binary data. |
sBufferSize | Size of the buffer that receives the data (optional). |
nDataLen | Variable receiving the actual amount of retrieved data (in bytes; optional). |
dcltrans transaction TMain var sString, sBuffer : string; begin AttributeSetString("name", "Jim"); AttributeSetInt("age", 23); AttributeSetDouble("cash", 4503.60); AttributeSetBinary("code", "\h9EF30533"); // do anything, for example, call an external function AttributeGetString("name", sString); writeln(sString); writeln(AttributeGetInt("age")); writeln(AttributeGetDouble("cash")); AttributeGetBinary("code", sBuffer); WriteData(sBuffer, STRING_COMPLETE); end TMain;