> -----Original Message-----
> From: Bill Luebkert
> >
> > So, my DEVMODE is a defines as 
> > 
> >  DEVMODE * FAR *mode
> > 
> > How does one unpack a double pointer to a struct?
> 
> I would assume define it as a ptr:
>       my $mode = pack 'P', 0;
> 
> And then you would need to do something like:
> 
>       my @devmode = unpack 'C180', unpack ('P', $mode);
> 
> on that pointer if I'm thinking right or replace the C180 with a list
> of each field in the structure's actual type:
> 
>       my ($dmDeviceName, $dmSpecVersion, $dmDriverVersion, $dmSize,
>         $dmDriverExtra, $dmFields, ...) = unpack 'C32S4I...', 
> unpack ('P', $mode);;         

The returned value from the API is a 4 Byte value (followed by nulls),
so I am sure it is a pointer.

> 
> I've never dealt with a ptr to a ptr so ...

Does anyone have any expereince using the Pointer.pm found at CPAN?
http://search.cpan.org/~ingy/Pointer-0.11/lib/Pointer.pm  And, if so,
can you do multiple layers of indirection with it?  I just found it this
morning on CPAN and don't have access to my development box until later
tonight.

Thanks,


Adam

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to