wanderbik Опубликовано 6 июня, 2008 Жалоба Share Опубликовано 6 июня, 2008 Мне необходимо читать и писать физические сектора HDD из под Windows (из под Делфовской аппликации). Если кто знает ткните носом плиз или дайте линк на какой нибуди портал системных программеров. Ссылка на комментарий Поделиться на другие сайты More sharing options...
Alex Novo Опубликовано 6 июня, 2008 Жалоба Share Опубликовано 6 июня, 2008 http://www.torry.net/vcl/filedrv/diskaccess/diskacc.zip By Alexander Grau. This toolbox supports read and write-access for Delphi on the entire hard disk. Runs under Windows 95, 98, ME, NT and 2000. Under Windows 95 the Toolbox uses a VXD-driver written for this purpose (INT 13 Extensionses VXD). The example-program is a sector monitor. http://www.torry.net/vcl/filedrv/diskacces...Access_v1-1.zip By Electronic Fantasy World. RDA makes direct, low-level, byte-precise reads and writes to mass-storage devices easy. No need to have to deal with DOS interrupt calls or any such nonsense - RDA takes care of all the behind-the-scenes work for you. RDA also handles the variations in access methods needed by different Windows versions. RDA can read from or write to any specific sector on a logical drive. And if that's not easy enough, there's even a nonvisual frontend component that makes RDA appallingly easy to use - pick drive/first sector/how many sectors to read, call one procedure to perform the actual read, read data from a property. New to RDA 1.1 - RDA has been upgraded to support partitions larger than 4GB. You can now read from or write to any sector or cluster on a FATxx or NTFS partition of any size the filesystem allows. RDA is based on and inspired by a Delphi unit file called VWIN32, written by Geir Wikran, and incorporates portions of VWIN32 directly. As such, RDA is released under the same licensing terms as VWIN32 - free for personal or commercial use as long as the source itself is never sold or misrepresented. RDA is designed for Delphi 7, but should be adaptible for most versions of Delphi with minimal to moderate editing. Please note: The RDA distribution includes a demo application which requires the Hexeditor components by Markus Stephany. http://www.torry.net/vcl/filedrv/diskaccess/dio.zip By CJSC G-Light. This component can be used with any version of 32-bit Delphi, and its units can be ported to C++ Builder. Now about TDiskIO functionality. The main functions in the units are commented. Direct disk access (read/write) logical sectors Direct disk access (read/write) FATs, clusters - supports FAT12, FAT16 and FAT32 file systems Works only under Windows 9.x Has everything needed in order to modify any disk file or directory directly inspite of its write protection or share aware, even running executables and DLLs. Достаточно для начала? Правда это все старье... Ссылка на комментарий Поделиться на другие сайты More sharing options...
Alex Novo Опубликовано 6 июня, 2008 Жалоба Share Опубликовано 6 июня, 2008 var CPConverted: LARGE_INTEGER; hDiskFile, hSaveFile : thandle; intreadedamount,BytesWritten : cardinal; Sector : int64; buf2 : array of byte; GoodRead : boolean; begin // Specify location Sector := 0; SetLength(buf2,512); CPConverted.QuadPart := (Sector * 512); {assumes sector is 512 bytes} // Open and read disk hDiskFile := CreateFile(pChar('\\.\PhysicalDrive1'), GENERIC_READ, FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); SetFilePointer(hDiskFile, Longint(CPConverted.LowPart), @CPConverted.HighPart, FILE_BEGIN); ReadFile(hDiskFile,buf2[0], length(buf2), intreadedamount, nil); CloseHandle(hDiskFile); // save buffer to text file hsavefile := CreateFile(pChar('C:\Test2.txt'), GENERIC_WRITE, FILE_SHARE_READ, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); WriteFile(hsavefile,buf2[0],length(buf2),BytesWritten,nil); CloseHandle(hsavefile); end; Пишет заданный сектор диска в файл. Ссылка на комментарий Поделиться на другие сайты More sharing options...
wanderbik Опубликовано 7 июня, 2008 Автор Жалоба Share Опубликовано 7 июня, 2008 Thank you very much!... Ссылка на комментарий Поделиться на другие сайты More sharing options...
Alex Novo Опубликовано 7 июня, 2008 Жалоба Share Опубликовано 7 июня, 2008 Это гуглю спасибо скажи, я-то тут при чем? Ссылка на комментарий Поделиться на другие сайты More sharing options...
wanderbik Опубликовано 8 июня, 2008 Автор Жалоба Share Опубликовано 8 июня, 2008 А Яндекс не стал искать сцуко... Ссылка на комментарий Поделиться на другие сайты More sharing options...
Alex Novo Опубликовано 8 июня, 2008 Жалоба Share Опубликовано 8 июня, 2008 Как ты можешь заметить, ресурсы не в рунете, так что яндексу простительно, он же сугубо национальный SE. Тема закрыта? Ссылка на комментарий Поделиться на другие сайты More sharing options...
Рекомендуемые сообщения
Заархивировано
Эта тема находится в архиве и закрыта для дальнейших ответов.