Raw_Disk_A1725603282004
所属分类:Pascal/Delphi编程
开发工具:WINDOWS
文件大小:395KB
下载次数:1
上传日期:2018-03-06 10:07:01
上 传 者:
unpacked
说明: hexeditors rawdisk 0001
文件列表:
demo_app (0, 2004-03-28)
demo_app\MainUnit.dcu (16406, 2004-03-07)
demo_app\MainUnit.ddp (51, 2004-03-07)
demo_app\MainUnit.dfm (10266, 2004-03-25)
demo_app\MainUnit.pas (17106, 2004-03-26)
demo_app\RawDiskAccess.dcu (29041, 2004-03-07)
demo_app\RawDiskAccess.pas (58589, 2004-03-07)
demo_app\RawDriveAccess.cfg (1614, 2004-02-24)
demo_app\RawDriveAccess.dof (3819, 2004-02-24)
demo_app\RawDriveAccess.dpr (315, 2004-03-26)
demo_app\RawDriveAccess.drc (29209, 2004-03-26)
demo_app\RawDriveAccess.exe (639488, 2004-03-07)
demo_app\RawDriveAccess.res (1880, 2004-03-26)
source (0, 2004-03-28)
source\RawDiskAccess.pas (58369, 2004-03-26)
source\RawDiskAccessAbout.dfm (5972, 2004-03-24)
source\RawDiskAccessAbout.pas (1124, 2004-03-24)
source\RawDiskAccessComponent.dcr (500, 2004-03-24)
source\RawDiskAccessComponent.pas (23071, 2004-03-26)
source\RawDiskAccess_D7.dpk (726, 2004-03-28)
source\RawDiskAccess_D7.drc (345, 2004-03-25)
source\RawDiskAccess_D7.res (1536, 2004-03-24)
source\rda_about.bmp (406, 2004-03-24)
RawDiskAccess
-------------
Direct, low-level raw drive access for practically all 32-bit Windows
releases
--------------
Created by Tom Honaker. Original code is (C) 2004 by Tom Honaker, All Rights
Reserved. Released as freeware, but all Copyrights apply.
Based on VWIN32.PAS by Geir Wikran, and contains code written by Geir Wikran.
Visit the EFW website for the latest version of RDA:
http://www.e-f-w.com/
For support, visit EFW's Info & Support Services message board:
http://www.e-f-w.com/forum/
================================================================================
1. What is RDA?
2. Why use RDA?
3. Is it safe? Is it stable?
4. Licensing Terms
5. Using RDA
6. Var/Function/Procedure Reference
1. What is RDA?
================================================================================
RawDiskAccess is a single, unified developer's solution for directly accessing
disk drives from within Windows versions using the 9x or NT kernels. RDA
provides simple mechanisms for reading from or writing to individual disk
sectors or whole clusters, reading boot sector information for a drive,
deriving a drive's geometry and free/used space, even detecting the specific
version of Windows on which the application is running.
RDA was inspired by Geir Wikran's VWIN32.PAS, an excellent low-level disk
access unit file for Windows 9x/ME. As such, RDA directly incorporates a number
of the functions and procedures in VWIN32.PAS, and wraps them with OS-kernel
detection code that automatically determines which method to use based on the
operating environment. Since RDA uses code from VWIN32.PAS, RDA is made
available under the same licensing terms as VWIN32.PAS.
RDA uses the appropriate method for raw, low-level disk access based on the
Windows version. For 9x/ME, this involves invoking the VWIN32 VxD and
firing control codes at it to perform the desired result. NT-kernel Windows
versions use a simple CreateFile API call to achieve the same results. When
the calling application uses RDA's RDAReadClusters function, for example, RDA
checks the OS kernel type and then invokes the proper function to read the
drive's clusters into a buffer.
RDA was designed for Delphi 7 and above, but should work with minimal changes
on Delphi 6, and may work on earlier versions with changes. RDA has not been
tested as to whether it is thread-safe, so utilize it with caution if the
application is multithreaded, and be sure not to try to write to the same
drive twice at one time as volume locks will become an issue.
2. Why use RDA?
================================================================================
RDA can cut development time by a considerable margin for applications that
need to access a drive directly. Plus, by using RDA a developer can skip having
to learn the intricasies and idiosyncrasies of the underlying filesystems and
how each Windows family handles direct access. Just add the unit file and go.
Or, make it even easier... Drop the RDA frontend component onto a form, set a
few properties, and go.
3. Is it safe? Is it stable?
================================================================================
RDA is as safe as is possible for something that can reach a disk at this low a
level, and as stable as the rest of the application allows it to be. If the
developer takes reasonable care to not write incorrect data into the wrong
areas of a drive, everything will be bliss.
If misused, RDA could be INCREDIBLY destructive, so caution is advised!
4. Licensing Terms
================================================================================
The header in RDA contains the terms of its use, which is as follows:
Please note that while RDA is made freely available, Geir's
license terms apply to RDA as well:
"This source code is freeware. You may use, change, and
distribute without charge the source code as you like. This
unit can be used freely in any commercial applications.
However, it may not be sold as a standalone product and the
source code may not be included in a commercial product.
This unit is provided as is with no warrent [sic] or
support. Make sure to read relevant information and
documentation from Microsoft before using this unit."
In other words, you may use RDA for any commercial or
private project, but you must NOT include the source itself
in any commercial project, nor can you sell the source.
5. Using RDA
================================================================================
RDA is very easy to implement. Add the unit to your project, create a buffer
of a suitable size, and populate it with data from the drive with a single
function call. Since it is picky about structures, though, a frontend component
hsa also been provided, and that makes implementing RDA a case of drop-code-use
simplicity.
The only thing you may find tricky is the buffer. The reccommended method for
creating the buffer is to create a TMemoryStream and pass its Pointer property
to the RDA read or write calls. Any contiguous memory segment reserved for
direct memory access can be used as a buffer, however, but you must ensure
the buffer is at least as big as the amount of data you intend to read, so
it may be wise to call the RDAFindDiskSizeInformation function to obtain the
drive's geometry, or use RDAReadSectors to read the boot sector (sector 0)
and get the geometry from there.
RDA automatically locks and unlocks FATxx volumes during writes in Windows 9x/
ME, so take this into consideration during your application's design.
Also, please note that RDA works at the logical-drive level, and was not
designed to work at the physical drive level for safety reasons.
6. Var/Function/Procedure Reference
================================================================================
Following is a list of the variables, functions, and procedures used in RDA...
Types
-----
type TMediaIdentifier
This type holds three pieces of information for a drive: its serial number,
volume name, and the type of filesystem it reports.
type TDIOC_Registers
This type holds DeviceIOCOntrol registers, and is used internally for
Windows 9x/ME direct drive access. Applications should not need to use
this type directly unless implementing custom low-level calls.
type TReadWritePacket
This type is used internally for direct disk access in Windows 9x/ME.
Applications should not need to use this type directly unless implementing
custom low-level calls.
type TDiskSizingInformation
This type holds geometry information for the target drive, including both
sector and cluster size, used/free/total disk space, and cluste counts.
type TWinVersion
This type holds the version information for the Windows platform the
calling application is running on. Both version/build number and a
human-readable Windows version string are provided. Additionally, this
type can display Service Pack information.
type TOSVersionInfoEx
This type is used internally for the OS version detection. Applications
should not need to use this type directly.
type TNTFSBootRecord
This type breaks the contents of the boot sector (sector 0) of a NTFS
partition down into its constituent parts, for easier access and
utilization.
type TFAT32BootRecord
This type breaks the contents of the boot sector (sector 0) of a FATxx
partition down into its constituent parts, for easier access and
utilization. Although the type is designed for FAT32, it works for FAT12
and FAT16 partitions as well.
type TFAT32Attributes
This type is a set of attribute flags, and is used by TFAT32DirEntry,
below.
type TFAT32DirEntry
This type breaks a 32-byte segment of data into a standard FAT filename
record. This type is the MS-DOS 8.3 format filename entry - use
TFAT32DirEntryLFN, below, for long filename entries.
type TFAT32DirEntryLFN
This type breaks a 32-byte segment of data into a FAT long-filename (LFN)
entry. LFNs always appear above (read: before) the short 8.3 format
equivalent.
Private Functions
-----------------
NOTE: These functions are called from the public functions, and generally
should not be called directly.
MapNetworkDrive - returns an Integer
This function attempts to map a network share to a drive letter.
DisconnectNetworkDrive - returns an Integer
This function attempts to disconnect a mapped network share.
RDAReadNTSectors - returns a Boolean, and writes data to a buffer
This function performs the actual read operation in NT-kernel Windows
versions. This function should not be called directly - use RDAReadClusters
or RDAReadSectors instead.
RDAWriteNTSectors - returns a Boolean, and reads data from a buffer
This function performs the actual write operation in NT-kernel Windows
versions. This function should not be called directly - use RDAWriteClusters
or RDAWriteSectors instead.
VWIN32DIOC - returns a Boolean, and moves data into and out of a buffer
This function performs the actual DeviceIOControl call, along with
automatic loading and unloading of the VWIN32 VxD. This function should not
be called directly.
RDARead9xSectors - returns a Boolean, and writes data to a buffer
This function performs the actual read operation in 9x-kernel Windows
versions. This function should not be called directly - use RDAReadClusters
or RDAReadSectors instead.
RDAWrite9xSectors - returns a Boolean, and reads data from a buffer
This function performs the actual write operation in 9x-kernel Windows
versions. This function should not be called directly - use RDAWriteClusters
or RDAWriteSectors instead.
RDALockLogicalVolume - returns a Boolean
This function attempts to place a volume lock on a logical drive, in
preparation for a direct write operation. This function should not be
called directly.
RDAUnlockLogicalVolume - returns a Boolean
This function attempts to unlock a locked logical drive, after a direct
write operation is atempted. This function should not be called directly.
Published Public Functions
--------------------------
RDAKernelFamily - returns a String
This function performs a basic OS kernel familty check, and returns the
kernel family as a simple string.
RDAGetMediaIdentifier - returns a TMediaIdentifier
This function reads a logical drive's serial number, volume name, and
filesystem type.
RDAFindDiskSizeInformation - returns a TDiskSizingInformation
This function reads a logical drive's basic geometry.
RDAWindowsVersion - returns a Boolean
This type performs a basic true-or-false comparison of whether the
current OS version is at least as new as a given build.
RDAAcquireOSVersion - returns a TWinVersion
This function obtains complete version information, including Service Pack
and OS suite details, for the currently running version of Windows.
RDAReadClusters - returns a Boolean, and writes data to a buffer
This function attempts to read a given number of whole drive clusters,
starting with a given cluster number. If successful, the function will
write the contents to a buffer whose pointer is passed to the function.
RDAWriteClusters - returns a Boolean, and reads data from a buffer
This function attempts to write a given number of whole drive clusters,
starting with a given cluster number. If successful, the function will
read from the contents to a buffer whose pointer is passed to the function.
RDAReadSectors - returns a Boolean, and writes data to a buffer
This function attempts to read a given number of drive sectors, starting
with a given sector number. If successful, the function will write the
contents to a buffer whose pointer is passed to the function.
RDAWriteSectors - returns a Boolean, and reads data from a buffer
This function attempts to write a given number of drive sectors, starting
with a given sector number. If successful, the function will read from
the contents to a buffer whose pointer is passed to the function.
================================================================================
END OF README
近期下载者:
相关文件:
收藏者: