Thank you very much, Bill. This trick worked fine. Now I have all the memory
allocated by the program in a text file. Now I just have to refine
the script to look for the specific number. Have great weekend!!
Alejandro
----- Original Message -----
From: "$Bill Luebkert" <[EMAIL PROTECTED]>
To: "Alejandro Santillan Iturres" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Saturday, August 27, 2005 12:20 PM
Subject: Re: Win 32 memory access
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
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs