Parry Troy writes:
 > Does anyone know how to eject a CDROM from a perl script (Win32)?
 > Im trying to do it through Win32API::File.
 > DeviceIoControl( $hDevice, $uIoControlCode, $pInBuf, $lInBuf, $opOutBuf,
 > $lOutBuf, $olRetBytes, $pOverlapped );
 > 
 > $hDevice is supposed to be a Win32 native file handle to a device.  What does
 > that mean?

According to the doco ('perldoc Win32API::File') it is returned from
CreateFile.

 > 
 > I cant seem to figure out what I need to do to make this work!
 > How does this command know what drive I want to eject?
 > I found that $uIoControlCode should be 'IOCTL_STORAGE_EJECT_MEDIA', but when I
 > do that, it complains that $uIoControlCode isnt numeric!

Again according to the doco, Win32API::File exports it when you use
the tag :IOCTL_STORAGE.


-- 
Brian Raven
double value;                /* or your money back! */
short changed;               /* so triple your money back! */
             -- Larry Wall in cons.c from the perl source code
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to