Siebel Library Write Data Method
The Siebel Library Write Data method writes data to a specific position in memory. It returns the address of the byte that immediately follows the data that it writes.
Caution: If your code directly accesses memory, then
you must use this code with caution. To avoid moving data unexpectedly,
you must clearly understand how the Siebel Library Write Data method
affects memory.
Format
SElib.poke(address, data[, dataType])
The following table describes the arguments for the Siebel Library Write Data method.
Argument | Description |
---|---|
address |
The starting address in memory where this method writes data. |
data |
The data that this method writes in memory. The data type of this data must match the type that you specify in the dataType argument. |
dataType |
For more information, see Siebel Library Peek Method. |
Example
The following example includes the Siebel Library Write Data 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: