I am an unfortunate windows programmer fairly new to the grand world of Perl. My question, and request for knowledge is this: Is there any way, within Perl and either Win32 or Win32API of checking to see if a user has a CD-RW or CD-R drive attached to his/her machine? I don't care if it's kludgy; the only way I can see to do this is to find the CD drive using
while(@drives and (not $is_cdrw))
{
my $drive = pop(@drives);
if(GetDriveType($drive) eq DRIVE_CDROM)
{
# see if it's writable by trying to write a file....
$ok = CreateFile($drive + "void");
}
}
I am seeking a somewhat less clunky than the above...
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |