首页  编辑  

判断光盘是否是CD

Tags: /超级猛料/Multi-Media.多媒体相关/   Date Created:

Function AudioCD(Drive : Char) : Boolean;

Var

FSFlags, MaxLength: DWORD;

VolName, Path : String;

Begin

    Path := Drive + ':\';

    Result := FALSE;

    if (GetDriveType(PChar(Path)) = DRIVE_CDROM) then

            Begin

SetLength(VolName, 64);

GetVolumeInformation(PChar(Path), PChar(VolName), Length(VolName), nil, MaxLength, FSFlags, nil,0);

if (lStrCmp(PChar(VolName),'Audio CD') = 0) Then Result := TRUE;

           End;

end;