Help for this page

Select Code to Download


  1. or download this
    my $handle;
    my $thispid = Win32::Process::GetCurrentProcessID(); # differs from $$
    + under cygwin
    Win32::Process::Open($handle, $thispid, 1);
    
  2. or download this
    my $readmem = Win32::API->new( kernel32 => q| BOOL ReadProcessMemory(
        HANDLE hProcess, LPCVOID lpBaseAddress, LPVOID lpBuffer, SIZE_T nS
    +ize, SIZE_T* lpNumberOfBytesRead
    )|);
    
  3. or download this
    my $buf  = " " x 40;
    my $read = " " x 10;
    ...
    } else {
        print "The read failed I guess($read): $!\n\t", unpack("H*", $buf)
    +, "\n";
    }
    
  4. or download this
    my $openpid = Win32::API->new( kernel32 =>
    q|HANDLE OpenProcess(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD
    + dwProcessId)| );