[fpc-pascal] FPC and Memory
Tomas Hajny
XHajT03 at mbox.vol.cz
Sun May 1 13:26:39 CEST 2005
Subject: Re: [fpc-pascal] FPC and Memory
To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
Date sent: Sun, 1 May 2005 12:27:30 +0200 (CEST)
From: marcov at stack.nl (Marco van de Voort)
Send reply to: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
<mailto:fpc-pascal-request at lists.freepascal.org?subject=unsubscribe>
<mailto:fpc-pascal-request at lists.freepascal.org?subject=subscribe>
> [ Charset ISO-8859-1 unsupported, converting... ]
> > Yes, this is interisting but I'd like for example to create a memory
> > image of some part of ram to see exactly what is there. In old dos
> > days it was possible to do like for i:=0 to 65535 do for j:=0 to 15
> > do write(f,mem[i,j]); or similarly. But how can be done this in
> > Windows?
>
> Not like this. There are some ways via win32 api calls probably, but
> these are probably privileged (requires adminstrator rights)
>
> I'd search for "physical memory access" or so on MSDN.
Although I'm no Win32 programmer, I'd expect that "physical memory
access" should be only possible from drivers (and that wouldn't help
here anyway, because one doesn't know the real "physical memory
address" used by the other process). Accessing memory of another
process (without special support in this process) is probably only
possible through the debugging API mentioned by somebody else (which
needs NT privilege for debugging). Another (IMHO better) alternative
could be by using shared memory (allocated as such in the "monitored"
process), or by providing hooks in the monitored process for
enquiring the current status. These hooks could be provided by having
a dedicated thread in the monitored process listening for requests
sent through a named pipe (local only, very easy to setup) or a
TCP/IP socket (allows remote monitoring too, but somewhat more
overhead).
Tomas
More information about the fpc-pascal
mailing list