Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>c4w_peek()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
C4W_Peek()
Return an area of memory
------------------------------------------------------------------------------

Syntax
C4W_Peek( <nPtr>, [ <nCount> ] )   -->   cStr

Arguments
<nPtr> is a pointer to the start of the memory.

<nCount> optionally specifies the number of bytes.  The
default is zero, meaning to return bytes up to (but not
including) the first byte which is CHR( 0 ).

Returns
A string containing the bytes of memory.

Description
This function is intended for use with messages where the
<nlParam> value is a pointer to a data structure.  Use it with
care.

Example
// Taken from source\odraw.prg

#include "drawitem.ch"

static function DrawBtn1(hWnd, nMsg, nwParam, nlParam)
// nMsg == WM_DRAWITEM, so nlParam is LPDRAWITEMSTRUCT
// (i.e. a C pointer)
local     aDIS := bin2a( c4w_peek( nlParam, 26 ), DIS_STRUCT_DEF )
local     hDC  := aDIS[ DIS_hDC ]

// . . .

See Also: C4W_Poke()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson