#!/usr/bin/perl use Win32::API::Prototype; Win32::API::Struct->typedef( TCdRom => qw{ int HaId; int Target; int Lun; char Vendor[256]; char ProductId[256]; char Revision[256]; char VendorSpec[256]; }); Win32::API::Struct->typedef( TCdRoms => qw{ BYTE CdRomCount; TCdRom Drive[26]; }); ApiLink( 'DiscIdCalcDLL.dll', 'int GetCdRomDrives(LPTCdRoms CdRoms)' ) || die; $cds = Win32::API::Struct->new('TCdRoms'); for (my $i = 0; $i < 26; $i++) { $drvs[$i] = Win32::API::Struct->new('TCdRom'); $cds->{Drive}[$i] = $drvs[$i]; } $x = GetCdRomDrives(\$cds); ########## (ETC) #########################