Multimidia - ver se eh cd de audio |
Top Previous Next |
|
Mas para detectar se é um CD de AUDIO use a seguinte funcao:
function IsAudioCD(Drive : char) : bool; var DrivePath : string; MaximumComponentLength : DWORD; FileSystemFlags : DWORD; VolumeName : string; begin Result := false; DrivePath := Drive + ':\'; if GetDriveType(PChar(DrivePath)) <> DRIVE_CDROM then exit; SetLength(VolumeName, 64); GetVolumeInformation(PChar(DrivePath), PChar(VolumeName), Length(VolumeName), nil, MaximumComponentLength, FileSystemFlags, nil, 0); if lStrCmp(PChar(VolumeName),'Audio CD') = 0 then result := true; end; |