Structure RTFDriver
Pointers to the driver's functions must be contained in a global variable of structure type RTFDriver declared in Include\Rtfiles.drv:
#define RTFAPI __cdecl
typedef struct rtfdriver {
UINT Version;
int (RTFAPI * MountDevice) (void * DriveData,
int DeviceNumber,
int DeviceType,
DWORD Flags);
int (RTFAPI * ShutDown) (void * DriveData);
int (RTFAPI * ReadSectors) (void * DriveData,
RTFSector Sector,
UINT Sectors,
void * Buffer);
int (RTFAPI * WriteSectors) (void * DriveData,
RTFSector Sector,
UINT Sectors,
void * Buffer);
int (RTFAPI * MediaChanged) (void * DriveData);
int (RTFAPI * DiscardSectors) (void * DriveData,
RTFSector Sector,
UINT Sectors);
int (RTFAPI * GetDiskGeometry)(void * DriveData,
RTFPartitionRecord * DiskGeometry,
BYTE * MediaDescriptor);
int (RTFAPI * LowLevelFormat) (void * DriveData,
const char * DeviceName,
RTFFormatCallback Progress,
DWORD Flags);
int (RTFAPI * IoControl) (void * DriverData,
UINT ControlCode,
void * Buffer,
UINT Length);
} RTFDriver;
Field RTFDriver.Version must contain the RTFiles-32 version number (symbol RTFILE_VER). It is used to ensure that all drivers are recompiled when new RTFiles-32 versions are released. RTFiles-32 will issue a fatal error if it finds an out-of-date driver.
Function MountDevice
|