Alejandro Santillan Iturres wrote:

> Well, the number is 1223.56 for just a couple of seconds (it is the S&P500
> value). But if I am able to get the memory dumped I can seek for
> some sequence of chars that precede the number in order of getting its value
> as it evolves in time.
> What I have no idea is how to get a complete memory dump of this program in
> the form of a text file so I am able to parse it beforehand.

That's easy just run this and redirect into a file:

use strict;
use warnings;
use Win32::Process::Memory;

# pass the pid in as first arg

my $proc = Win32::Process::Memory->new({pid => shift}) or
  die "new Win32::Process::Memory: $! ($^E)";

my %memlist = $proc->get_memlist;

foreach (sort { $a <=> $b } keys %memlist) {
        print "$_ => $memlist{$_}\n";
        print $proc->hexdump($_, $memlist{$_}) . "\n";
}

__END__


-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to