Hi,
https://metacpan.org/pod/Win32::API#USING-STRUCTURES gives some explanation about "LP" prefix
Here is a modified version of samples/GetCursorPos.pl
#!/usr/bin/perl -- use strict; use warnings; use Data::Dump qw/ dd /; use Win32::API; Win32::API::Struct->typedef( POINT => qw( LONG x; LONG y; ) ); Win32::API->Import('user32' => 'BOOL GetCursorPos(LPPOINT pt)'); #### using OO semantics my $pt = Win32::API::Struct->new('POINT'); @{$pt}{qw/x y/} = (0,0); GetCursorPos($pt) or die "GetCursorPos failed: $^E"; print "Cursor is at: $pt->{x}, $pt->{y}\n"; #### using tie semantics my %pt; tie %pt, 'Win32::API::Struct' => 'POINT'; @pt{qw/x y/}=(0,0); GetCursorPos(\%pt) or die "GetCursorPos failed: $^E"; print "Cursor is at: $pt{x}, $pt{y}\n"; dd( map{ { "is_known $_ ", Win32::API::Type->is_known($_)}; } qw{ POIN +T LPPOINT } ); __END__ Cursor is at: 198, 273 Cursor is at: 198, 273 ({ "is_known POINT " => 1 }, { "is_known LPPOINT " => "" })
so POINT is know, but LPPOINT is not known, and that isn't a problem
In reply to Re^3: Win32::API and keyboard hook
by beech
in thread Win32::API and keyboard hook
by frazap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |