Siebel Library Peek Method

The Siebel Library Peek method reads, and then returns data from a position in memory.

Format

SElib.peek(address[, dataType])

The following table describes the arguments for the Siebel Library Peek method.

Argument Description

address

Identifies the address in memory that this method uses to read data.

dataType

The type of data that this method returns. You can specify one of the following types:

  • UWORD8

  • SWORD8
  • UWORD16
  • SWORD16
  • UWORD24
  • SWORD24
  • UWORD32
  • SWORD32
  • FLOAT32
  • FLOAT64
  • FLOAT80

The default value is UWORD8.

You can add the following prefix on some types:

  • S for signed

  • U for unsigned

The numeric suffix specifies the number of bytes to get. An example of a numeric suffix is 8 or 16.

FLOAT80 is not available in Win32.

Example

The following example uses the Siebel Library Peek method:

TheApplication().TraceOn("c:\\eScript_trace.txt","allocation","all");
var v = new Buffer("Now");
// Collect "Now", the original value, for display.
TheApplication().Trace(v);
// Get the address of the first byte of v, "N"
var vPtr = SElib.pointer(v);
// Get the "N"
var p = SElib.peek(vPtr);
// Convert "N" to "P"
SElib.poke(vPtr,p+2);
// Display "Pow"
TheApplication().Trace(v);
TheApplication().TraceOff();

This example produces the following output:

COMMENT,Now
COMMENT,Pow

For more information, see the following topics: