PokeS()

Syntax

PokeS(*MemoryBuffer, Text$ [, Length [, Flags]])
Description
For advanced programmers. Writes a string (including the ending '0') to the specified memory address.

An optional length parameter (in bytes) can be specified that defines the length of the string itself, a zero will still be placed in memory after the poked string (ie. specifying 6 will write 7 bytes, 6 for the string, and the last byte will be zero).

If the 'Flags' parameter isn't specified, the string is written as unicode if the program is compiled in unicode mode, else it is written as ascii.

The optional 'Flags' parameter can be one of the following values:
  #PB_Ascii  : Writes the string as ascii, even when the program is compiled in unicode mode
  #PB_UTF8   : Writes the string as UTF8 (the program can be either in unicode or ascii mode)
  #PB_Unicode: Writes the string as unicode, even when the program is compiled in ascii mode
When the 'Flags' parameter is specified, the 'Length' can be put to -1, PokeS() will then evaluate the needed string length automatically.

Note: a combination of PokeS() and PeekS() can be used to perform conversion between the different supported string modes (Ascii, UTF8 and Unicode).

Supported OS

All

<- PokeQ() - Memory Index - PokeW() ->