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

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?

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