[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FN_PEEKSTR()
 Read a string of bytes from memory
------------------------------------------------------------------------------
 Syntax
 
       fn_PeekStr( <nSegment>, <nOffset>, <nLength> ) -> cBinStr
 
 Arguments

      <nSegment> is the memory segment to read.

      <nOffset> is the starting offset from <nSegment> to read from.

      <nLength> is the number of bytes to read.

 Returns

      A string containing the characters found at <nSegment>:<nOffset>.

 Description

      Use this function to perform memory reads of a contiguous block of
      memory.  The string returned contains one character for each byte
      of memory read.

      If you plan to perform consecutive memory reads from memory, for
      instance in filling an array, pass <nOffset> by reference to keep
      it updated in the calling routine.

 Examples

      /* fill an array with 8-bytes taken from a block in memory */

      ARRAY( aMemValues, 10 )                 // create a Clipper array

                  nSeg := <...>                                                                 // initialize pointers to
      nOff := <...>                           //  desired memory location

      AEVAL( aMemValues, {|e| e = fn_PeekStr( nSeg, @nOff, 8 ) }


 Source: N:\SRC\MISC\FNPEEK.PRG

 Author: Steve Larsen

See Also: fn_PokeStr()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson