Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Win32::API to import function

by Anonymous Monk
on Mar 01, 2005 at 13:55 UTC ( [id://435424]=note: print w/replies, xml ) Need Help??


in reply to Re: Win32::API to import function
in thread Win32::API to import function

If I use the following line to import the function:

Win32::API->Import('Rscw32', 'USHORT RSCCHK(ULONG ulConnectionHandle,ULONG ulSessionHandle,SHORT *pnIoHandle,VOID *pvReplyBuffer,USHORT *puReplySize)');

I have a crash at this line (i.e. as soon as I use it):

$sReturn = RSCCHK($sConnectionHandle,
$sSessionHandle,
$sCheckAll,
$sReplyBuffer,
$sReplySize);

Note: To import the "RscIoCheck" function, I need to use his API function name "RSCCHK".

Replies are listed 'Best First'.
Re^3: Win32::API to import function
by ptk (Initiate) on Mar 01, 2005 at 14:16 UTC
    I have try the "Import" and the following:

    my $sFuncRscIoCheck = new Win32::API('Rscw32', 'USHORT RSCCHK(ULONG ul +ConnectionHandle,ULONG ulSessionHandle,SHORT *pnIoHandle,VOID *pvRepl +yBuffer,USHORT *puReplySize)'); $sReturn = $sFuncRscIoCheck->Call($sConnectionHandle, $sSessionHandle, $sCheckAll, $sReplyBuffer, $sReplySize);

    They crash the perl interpreter with the Win error message: "Perl Command Line Interpreter has encountered a problem and needs to close. We are sorry for the inconvenience.".

    Any other idea?
      To make it work, write:

      my $sReturn = $sFuncRscIoCheck->Call($sConnectionHandle, $sSessionHandle, $sCheckAll,<br> $sReplyBuffer, $sReplySize) & 0xFF; print "My Return is : $sReturn\n";

      The return value will be set to 17 as expected.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://435424]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-18 03:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found