Function TForm1.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;
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;
解决方案 »
- delphi 2010 为什么WM_GETTEXT只能取一个字节啊?
- 如何在WebBrowser中调用当前页面中的javascript函数
- Delphi输入的汉字复制到WORD中变成了乱码
- 怎样动态设定StringGrid某一列的宽度?急!!!!!!分不是问题,小弟急用!
- FR能不能实现数据转取功能
- 高难度的Oracle和SQLServer的问题!?!?
- ADOQUERY涉及的表中有一项为 MS SQLSERVER中的BIT类型,如果这一项为FALSE,ADOQUERY查询能正常进行,如果这一项为TRUE就出错,ADOQUERY查
- 请教问题:关于字符串的保存?
- DELPHI数据库中如何实现多任务表单
- 我的软件出了新版本,希望大家能捧捧场
- DELPHI里面,从begin到相就的end,用什么快捷键??
- Delphi 4 IDE中运行程序退出后就违例出错
procedure TForm1.check;
var
filename:array[0..20]:string;
i,err:integer;
rs:tsearchrec;
begin
err:=findfirst('e:\mpegav\*.dat',faanyfile,rs);
while err=0 do
begin
if rs.Name[1]<>'.' then
begin
filenames[i]:='e:\mpegav\'+rs.name;
err:=findnext(rs);
end;
end;
if i>1 then
begin
vcdplay.FileName:=filenames[1];
try
vcdplay.open;
vcdplay.play;
except
showmessage('恅璃跡宒渣昫');
end;
end
else showmessage('羶衄VCD嫖詠');
end;
哪儿有关于VCD格式的说明?