CGET_BUFFER
Read a number of characters located in a memory area.
WebVue support - Yes.
Syntax
StrVal = CGET_BUFFER(Handle, Offset [, Chars[, Flag]]);
Return type: STR.
Argument |
Meaning |
Handle |
The location of the memory buffer. Type LONG. |
Offset |
The offset in bytes (1 byte per character) representing the point at which the read will start. Any numeric type. |
Chars |
The number of characters that are to be returned. If omitted, one character will be returned. Any numeric type. |
Flag |
Conversion of the character string from ASCII to ANSI. A value of 1 disables conversion, 0 enables it. |
Execution
Read a number of characters from the specified memory location and return them in a string.
The character string returned is converted to ANSI code for Windows unless Flag = 1.
Example
SUB Main()
DIM bufh as LONG;
CONST SIZE = 0;
CONST MODI = 4;
CONST ALLOC = 22;
bufh = ALLOC_BUFFER(ALLOC);
PRINT(FSTAT("myfile.dat", bufh));
PRINT("Size (bytes) :",IGET_BUFFER(bufh,SIZE));
PRINT("Date changed :",CGET_BUFFER(bufh,MODI));
FREE_BUFFER(bufh);
END SUB
For further examples, select the Example link above.