Siebel eScript Language Reference > Methods Reference > BLOB Methods >

About the BLOB Descriptor


The blobDescriptor object describes the structure of a BLOB (binary large object). If you must configure Siebel CRM to send an object to a process other than the Siebel eScript interpreter, such as to a Windows API function, then you must configure it to create a blobDescriptor object that describes the order and type of data of this object. This description describes how to store the properties of the object in memory. You use it with methods such as the Siebel Library Call DLL method or the Clib Read From File method. For more information, see Siebel Library Call DLL Method and Clib Read From File Method.

A BLOB descriptor includes the same data properties as the object it describes. You must set a value for each property that specifies how much memory is required to store the data that the property holds. To refer to the arguments passed to the constructor function, you use the following keyword:

this

You can think of this keyword conceptually as this object. Consider the following object:

Rectangle(width, height)
{
   this.width = width;
   this.height = height;
}

To configure Siebel eScript to pass data to the following items, you typically use a BLOB descriptor:

  • Siebel eScript data structure, which is similar to JavaScript
  • C program or a C++ program
  • Clib method

These items expect a rigid and precise description of the values that Siebel eScript passes.

Example of Using a BLOB Descriptor

The following example creates a blobDescriptor object that describes the Rectangle object:

var bd = new blobDescriptor();

bd.width = UWORD32;
bd.height = UWORD32;

In this example, you can use Siebel eScript to pass the bd variable as a blobDescriptor argument to a function that requires a blob descriptor. The values set for the properties depend on what the receiving function expects. In this example the function that Siebel CRM calls expects to receive an object that includes two 32-bit words or data values. If you write a BLOB descriptor for a function that expects to receive an object that contains two 16-bit words, then set the value for the two properties to UWORD16.

Values You Must Use with a BLOB Descriptor

Table 44 describes the values that you must use with blobDescriptor object properties. To indicate the number of bytes that are required to store the property, you use one of these values. If the BLOB descriptor describes an object property that is a string, then you must set the corresponding property to a numeric value that is larger than the length of the longest string that the property can hold. You can write code that omits an object method from a BLOB descriptor.

Table 44. Values You Can use With the blobDescriptor
Value
Description

WCHAR

Handled as a native Unicode string.

UWORD8

Stored as an unsigned byte.

SWORD8

Stored as an integer.

UWORD16

Stored as an unsigned 16-bit integer.

SWORD16

Stored as a signed 16-bit integer.

UWORD24

Stored as an unsigned 24-bit integer.

SWORD24

Stored as a signed 24-bit integer.

UWORD32

Stored as an unsigned 32-bit integer.

SWORD32

Stored as a signed 32-bit integer.

FLOAT32

Stored as a floating-point number.

FLOAT64

Stored as a double-precision floating-point number.

STRINGHOLDER

Indicates a value that Siebel eScript saves in a string. Siebel eScript passes this value to a function. This function saves this string. Siebel eScript does the following work:

  1. Allocates 10,000 bytes to contain the string.
  2. Truncates this length to the appropriate size.
  3. Removes any terminating null characters.
  4. Initializes the properties of the string.
Siebel eScript Language Reference Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.