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;
解决方案 »
- NT服务NT服务程序如何SHOW个FORM出来???
- 程序在Win2000中不能create一个ini?
- 小弟学编程成时间不长问一个幼稚的问题!恳求大侠们给个解答.
- 把以unicode编码的字符串转化成以gb编码的字符串(有gb--unicode的编码函数)
- 请教高手,急急急!MIDAS多层数据库开发问题,UP有分!
- *******TImage和TLabel合并成一个控件*******高手请进,高分请教
- InitiateSystemShutdown和ExitWindowEx
- 关于Delphi6报表中的qrexpr的应用问题
- 在程序中控制TLISTVIEW的滚动
- 一个傻问题?
- 谁有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;
这样就行了,,