Title: RE: Win32-API and ghostscript API

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
#
$GS_Rev->Call($rev,$size);

print $rev->{revision};



#####

JOhn


*************************************************************
Disclaimer
If this e-mail has been sent to you in error, please notify Oc�-Australia Limited immediately and delete this e-mail from your system. Any views expressed in this e-mail are those of the individual sender and may not necessarily reflect the views of Oc�-Australia Limited.

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

Reply via email to