fx has asked for the wisdom of the Perl Monks concerning the following question:
The Win32::API::Struct v0.41 module documentation states the following:
Also note that typedef automatically defines an 'LPNAME' type, which holds a pointer to your structure.
Using the example in that documentation, I have created a POINT structure. This should mean that I have also automatically created an LPPOINT structure.
If this is the case, why does the following not work:
#!c:\perl\bin\perl -w use strict; use Data::Dumper; use Win32::API; Win32::API::Struct->typedef( 'POINT', 'LONG', 'x', 'LONG', 'y' ); my $point = Win32::API::Struct->new( 'LPPOINT' ) or die $!; print Dumper( $point );
with the error message being:
Unknown Win32::API::Struct 'LPPOINT' at C:\point.pl line 9 Died at C:\point.pl line 9, <DATA> line 164.
Is the documentation wrong or am I not reading it correctly?
Thanks,
fx, Infinity is Colourless
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::API::Struct - Automatic pointer creation not working ?
by BrowserUk (Patriarch) on Jul 02, 2004 at 15:33 UTC | |
by fx (Pilgrim) on Jul 05, 2004 at 09:51 UTC |