直接CD-ROM扇区读取

  • 主题发起人 主题发起人 import
  • 开始时间 开始时间
I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
Ray, for WIndows NT, the following procedure fragment will give some hints: procedure TAudioCD.set_drive_letter (c: char);
var
cd_name: string;
er: integer;
begin
FDriveLetter := UpCase (C);
cd_name := '//./' + FDriveLetter + ':';
// connect to the CD-ROM directly, note the file name used....
hCD := CreateFile (PChar (cd_name), GENERIC_READ, FILE_SHARE_READ, nil,
OPEN_EXISTING, 0, 0);
if hCD = INVALID_HANDLE_VALUE then
begin
er := GetLastError;
Raise Exception.Create ('Failed to connect to CD-ROM drive, error ' +
IntToStr (er));
Exit;
end;
end;
Once you have hCD, look at the SetFilePointer and ReadFile Win32
functions....
You already have hints for Windows 98.
 
 

Similar threads

后退
顶部