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;
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;
解决方案 »
- 双色球<<><>
- tts 中怎么实现女声良朗读英语啊?多谢了
- 在利用Delphi中的Servers控件组操作Word的问题
- NMSMTP在哪有下载?
- 怎样将只读属性的文件改为可读写?
- 请问ServerSocket的OnAccepte和OnClientConnect有什么区别
- 请问窗体的OnShow事件倒底什么时候触发?
- ado的大 部分连接字符串的写法(来自codeproject)http://www.codeproject.com/database/connectionstrings.asp
- NAT端口是什么,怎么做一个NAT端口映射
- 在SQL中有没有表示今天的日期函数,有没有四舍五入的数学函数?
- 谁有canvas方面的资料!!
- ●如何挂断modem的连接●
什么拦截?
begin
if (E.ClassType.ClassName='EInOutError') then
begin
{do something great to (or for) the user}
MessageBox( Handle,'设备尚未准备好','错误',MB_OK or MB_ICONERROR);
end
else Application.ShowException(E); {let Delphi take it from here}
end;
这样就行了,,