Hello Lotus1

I wrote that concern recently. Please note though that I don't know how well these module are maintained exactly. The only thing that I said in my post that some things that I have tried didn't work, so I just expressed my concerns.

Now back to why this may not work...

I think that the problem is in the NT.pm module:

if ($EnumProcessModules->Call ($prchdl, $modhdl, length $modhdl, $ +modgot)) { $modhdl = unpack ('L', $modhdl); my $mfn = ' ' x MAX_PATH; if ($GetModuleFileNameEx->Call ($prchdl, $modhdl, $mfn, length $mf +n)) { $mfn =~ s/\0.*//; $mfn =~ s/^\\(\w+)/$ENV{$1} ? $ENV{$1} : "\\$1"/ex; $mfn =~ s/^\\\?\?\\//; $self->_build_hash ($dat, ExecutablePath => $mfn); my $base = basename ($mfn); $self->_build_hash ($dat, Name => $base) if $base; } }

I think EnumProcessModules is not returning anything in $modhdl. One thing that I don't exactly understand about this code that EnumProcessModules returns an array (according to Microsoft docs). And then there is an unpack statement and passed on to GetModuleFileNameEx which takes a module handle as second argument.

Other things that can be said about EnumProcessModules is that there is also an EnumProcessModulesEx which can be used to get 32-bit processes and 64-bit processes, so there may be the problem as well, that EnumProcessModules is not working on 64-bit

See also this discussion here

So to fix these kind of problems I think that someone may need to have a look at things.


In reply to Re: Partial troubleshooting of Win32::Process::Memory and request for fixes by Veltro
in thread Partial troubleshooting of Win32::Process::Memory and request for fixes by Lotus1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.