ptk has asked for the wisdom of the Perl Monks concerning the following question:
which is found in the "Rscw32.dll". To import it, I have the following script:USHORT RscIoCheck (ULONG ulConnectionHandle ,ULONG ulSessionHandle ,SHORT *pnIoHandle ,VOID *pvReplyBuffer ,USHORT *puReplySize );
When I use it, I call the function as follow:use Win32::API 0.40; my $sFuncRscIoCheck = new Win32::API('Rscw32', 'RSCCHK', 'IIPPP', 'I') +;
I'm expecting a return value of '17' but when I print the "$sReturn", I got '33685510'.my $sReturn; my $sIoHandle = RSC_IO_NOWAITED; my $sCheckAll = RSC_IO_CHECK_ALL; $sReturn = $sFuncRscIoCheck->Call($sConnectionHandle, $sSessionHandle, $sCheckAll, $sReplyBuffer, $sReplySize);
print "My Return is : $sReturn\n";my $sReturn = pack('S', 0); $sReturn = $sFuncRscIoCheck->Call($sConnectionHandle, $sSessionHandle, $sCheckAll,<br> $sReplyBuffer, $sReplySize); $sReturn = unpack('S', $sReturn);
Edit by BazB: add code tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::API to import function
by esskar (Deacon) on Feb 28, 2005 at 20:38 UTC | |
by Anonymous Monk on Mar 01, 2005 at 13:55 UTC | |
by ptk (Initiate) on Mar 01, 2005 at 14:16 UTC | |
by Anonymous Monk on Mar 15, 2005 at 13:46 UTC |