Thanks everyone for your help. First, Mr. Calpini, I tried what you put in your email. I still got an access violation (I'm on a Win2000 Service Pack 2; the library was compiled with Visual C++ 6.0 Enterprise Edition). The violation was "The instruction at "0x78001c9d" referenced memory at "0x00000000". The memory could not be "read"". I also tried placing a "\x00" at the end of my packed string. Same kind of violation occured when trying that. As for XS, I tried using SWIG instead but ran into the "PERL_OBJECT and MUILTIPLICITY do not work together" problem. From what I found in the archives, there is no obvious solution, i.e., no one answered the person's email. I am very close to trying XS but I really wanted a faster solution to the problem. If I need to use XS, so be it but I wanted to see if this could be used. Thanks again everyone.
Chris Yocum >From: "Aldo Calpini" <[EMAIL PROTECTED]> >To: "Chris Yocum" <[EMAIL PROTECTED]>, ><[EMAIL PROTECTED]> >Subject: Re: Win32::API >Date: Wed, 27 Mar 2002 15:33:10 +0100 >MIME-Version: 1.0 >Received: from [213.92.5.24] by hotmail.com (3.2) with ESMTP id >MHotMailBE6B233200B9400438A1D55C0518F10F0; Wed, 27 Mar 2002 06:33:23 -0800 >Received: (from root@localhost)by hal-5.inet.it (8.11.1/8.11.1) id >g2REXLA163944;Wed, 27 Mar 2002 15:33:21 +0100 >Received: from unknown(194.185.18.146) by hal-5.inet.it via >I-SMTP-4.0.6-100id s-194.185.18.146-YpYqT2; Wed Mar 27 15:33:21 2002 >From [EMAIL PROTECTED] Wed, 27 Mar 2002 06:33:56 -0800 >Message-ID: <03f701c1d59c$57ff5410$[EMAIL PROTECTED]> >References: <[EMAIL PROTECTED]> >X-Priority: 3 >X-MSMail-Priority: Normal >X-Mailer: Microsoft Outlook Express 5.50.4807.1700 >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 > >Chris Yocum wrote: > > $panda_open = Win32::API->new("c:\\temp\\panda", > > "panda_open", > > [P, P], > > P); > > > > $filename = pack("p", "dd.pdf"); > > $mode = pack("p", "w"); > > > > $panda_open->Call($filename, $mode); > >try without pack: > > $filename = "dd.pdf"; > $mode = "w"; > $panda_open->Call($filename, $mode); > >if you mark a Win32::API parameter as 'P' and it contains a string, >a pointer to that string is taken, which should be enough if your >parameter is a char*. you need to pack/unpack if you're passing >other kind of values (eg. a number, a structure, etc.) as a 'P' >parameter. > >cheers, >Aldo > >__END__ >$_=q,just perl,,s, , another ,,s,$, hacker,,print; > > _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs