Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

[SOLVED] Dereferencing a pointer returned from Win32::API with unpack 'p'

by ateague (Monk)
on Aug 10, 2015 at 20:17 UTC ( [id://1138074]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use 5.018;
    use strict;
    ...
    my $return = $method->Call('my ', 'potato');
    
    print Dumper $return; # prints 'my potato'
    
  2. or download this
    #!/usr/bin/perl
    use 5.018;
    use strict;
    ...
    # works(??): 'my potato'
    my $x = unpack 'p', pack 'IN', $return;
    print Dumper $x;
    
  3. or download this
    perl -v
    
    This is perl 5, version 18, subversion 4 (v5.18.4) built for MSWin32-x
    +64-multi-thread
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1138074]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-16 06:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found