Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Win32::API to import function

by esskar (Deacon)
on Feb 28, 2005 at 20:38 UTC ( #435185=note: print w/replies, xml ) Need Help??

in reply to Win32::API to import function

have you tried
my $sFuncRscIoCheck = new Win32::API('Rscw32', 'USHORT RscIoCheck(ULON +G ulConnectionHandle,ULONG ulSessionHandle,SHORT *pnIoHandle,VOID *pv +ReplyBuffer,USHORT *puReplySize)');

Replies are listed 'Best First'.
Re^2: Win32::API to import function
by Anonymous Monk on Mar 01, 2005 at 13:55 UTC
    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,

    Note: To import the "RscIoCheck" function, I need to use his API function name "RSCCHK".
      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?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2023-02-01 16:17 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (11 votes). Check out past polls.