Help for this page

Select Code to Download


  1. or download this
    typedef struct cRefStr 
    { 
        size_t length;        
        char const* data;   
    } cStrRef;
    
  2. or download this
    Win32::API::Struct->typedef(CSTRREF =>qw{int n; char* buffer});
    
  3. or download this
    # Sub all 
    # cTblAtKey -> findInTableByKey
    ...
        die "Couldn't load the function findInTableByKey from the dll";
    }
    $cellPtr = $aKeyFunc->Call($outputTable,$structParameter,0);
    
  4. or download this
     #### define the structure
        Win32::API::Struct->typedef( POINT => qw{
    ...
        #### and now, access its members
        my ($x, $y) =($pt->{x}, $pt->{y});
        print "The cursor is at: $x, $y\n";
    
  5. or download this
        #### import an API that uses this structure
        my $getCursor = new Win32::API('user32', 'GetCursorPos','S','N');
    ...
        #### and now, access its members
        my ($x,$y) = unpack('LL',$pt);
        print "The cursor is at: ".$x.", ".$y."\n";