Registriert seit: 10. Apr 2006
Ort: Leverkusen
972 Beiträge
Delphi 6 Professional
|
AW: Partition auslesen mit DeviceIoControl und IOCTL_DISK_GET_PARTITION_INFO_EX
9. Okt 2015, 18:37
Delphi-Quellcode:
begin
for h := 1 to 9 do
begin
Device:='\\.\Harddisk1'+IntToStr(h);
hdevice:=CreateFile(PChar(Device), 0, FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0);
if hDevice <> INVALID_HANDLE_VALUE then
begin
müsste das nicht so sein:
Delphi-Quellcode:
begin
for h := 1 to 9 do
begin
Device:='\\.\Harddisk'+IntToStr(h); // ohne die 1
hdevice:=CreateFile(PChar(Device), 0, FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0);
if hDevice <> INVALID_HANDLE_VALUE then
begin
|
|
Zitat
|