Rogers, John wrote on 04/20/2005 11:26:52 PM:
> Rob and Lloyd,
> Robs code actually works with gs8.15
> >I've just now noticed that the function you're accessing is called
> >'gsapi_revision' whereas I'm accessing 'gsdll_revision'.
> I got gsapi_ from the api.htm doc with gs8.15 gsdll_ is depreciated.
> A dll export browser shows both though. I assume there the same,
> only different format parameters
> Cant make gsapi_ work though.
> A Win32::API::Struct solution would be interesting though, following
> gives protection fault "memory can not be written.
> ########
> use strict;
> use Win32::API;
> my($GS_Rev,$rev,$DLL,$size);
> Win32::API::Struct->typedef( REVINFO => qw {
> CHAR *product;
> CHAR *copyright;
> LONG revision;
> LONG revisiondate;
> } );
> $rev = Win32::API::Struct->new('REVINFO');
> $DLL = 'C:\gs\gs8.15\bin\gsdll32.dll';
> $GS_Rev = Win32::API->new($DLL,'gsdll_revision','SL','V')
> or die "no-worky $! $^E";
> ### need to fix interface spec
> #
What is the value of $size? I don't see where it is set. (Although I
doubt this would result in a protection fault.) It appears that the
problem is the semantics of using a Struct in a Win32 call.
> $GS_Rev->Call($rev,$size);
> print $rev->{revision};
>
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs