51#define FF_T_FAT12 0x0A
52#define FF_T_FAT16 0x0B
53#define FF_T_FAT32 0x0C
55#define FF_MODE_READ 0x01
56#define FF_MODE_WRITE 0x02
57#define FF_MODE_APPEND 0x04
58#define FF_MODE_CREATE 0x08
59#define FF_MODE_TRUNCATE 0x10
60#define FF_MODE_DIR 0x80
62#define FF_BUF_MAX_HANDLES 0xFFFF
82#define FF_ERR_DRIVER_BUSY -10
83#define FF_ERR_DRIVER_FATAL_ERROR -11
113#ifdef FF_UNICODE_SUPPORT
173#define FF_FAT_LOCK 0x01
174#define FF_DIR_LOCK 0x02
195#ifdef FF_BLKDEV_USES_SEM
212#define FF_IOMAN_ALLOC_BLKDEV 0x01
213#define FF_IOMAN_ALLOC_PART 0x02
214#define FF_IOMAN_ALLOC_BUFDESCR 0x04
215#define FF_IOMAN_ALLOC_BUFFERS 0x08
216#define FF_IOMAN_ALLOC_RESERVED 0xF0
231#ifdef FF_64_NUM_SUPPORT
PRTL_UNICODE_STRING_BUFFER Path
#define FF_PATH_CACHE_DEPTH
#define FF_HASH_CACHE_DEPTH
struct _FF_HASH_TABLE * FF_HASH_TABLE
FF_T_SINT32 FF_BlockRead(FF_IOMAN *pIoman, FF_T_UINT32 ulSectorLBA, FF_T_UINT32 ulNumSectors, void *pBuffer)
FF_ERROR FF_UnmountPartition(FF_IOMAN *pIoman)
FF_ERROR FF_DecreaseFreeClusters(FF_IOMAN *pIoman, FF_T_UINT32 Count)
FF_BUFFER * FF_GetBuffer(FF_IOMAN *pIoman, FF_T_UINT32 Sector, FF_T_UINT8 Mode)
FF_T_SINT32(* FF_WRITE_BLOCKS)(FF_T_UINT8 *pBuffer, FF_T_UINT32 SectorAddress, FF_T_UINT32 Count, void *pParam)
FF_IOMAN * FF_CreateIOMAN(FF_T_UINT8 *pCacheMem, FF_T_UINT32 Size, FF_T_UINT16 BlkSize, FF_ERROR *pError)
FF_ERROR FF_UnregisterBlkDevice(FF_IOMAN *pIoman)
void FF_ReleaseBuffer(FF_IOMAN *pIoman, FF_BUFFER *pBuffer)
FF_T_SINT32 FF_BlockWrite(FF_IOMAN *pIoman, FF_T_UINT32 ulSectorLBA, FF_T_UINT32 ulNumSectors, void *pBuffer)
FF_T_SINT32(* FF_READ_BLOCKS)(FF_T_UINT8 *pBuffer, FF_T_UINT32 SectorAddress, FF_T_UINT32 Count, void *pParam)
FF_T_SINT32 FF_GetPartitionBlockSize(FF_IOMAN *pIoman)
FF_ERROR FF_DestroyIOMAN(FF_IOMAN *pIoman)
FF_ERROR FF_IncreaseFreeClusters(FF_IOMAN *pIoman, FF_T_UINT32 Count)
FF_ERROR FF_RegisterBlkDevice(FF_IOMAN *pIoman, FF_T_UINT16 BlkSize, FF_WRITE_BLOCKS fnWriteBlocks, FF_READ_BLOCKS fnReadBlocks, void *pParam)
FF_ERROR FF_MountPartition(FF_IOMAN *pIoman, FF_T_UINT8 PartitionNumber)
FF_ERROR FF_FlushCache(FF_IOMAN *pIoman)
FF_T_UINT64 FF_GetVolumeSize(FF_IOMAN *pIoman)
unsigned char FF_T_UINT8
8 bit unsigned integer.
signed long FF_T_SINT32
32 bit signed integer.
unsigned long long FF_T_UINT64
wchar_t FF_T_WCHAR
Unicode UTF-16 Charachter type, for FullFAT when UNICODE is enabled.
unsigned short FF_T_UINT16
16 bit unsigned integer.
char FF_T_BOOL
This can be a char if your compiler isn't C99.
unsigned long FF_T_UINT32
32 bit unsigned integer.
FF_T_SINT32 FF_ERROR
A special error code type to ease some inconsistencies in Error reporting.
char FF_T_INT8
8 bit default integer.
Describes the block device driver interface to FullFAT.
FF_WRITE_BLOCKS fnpWriteBlocks
Function Pointer, to write a block(s) from a block device.
FF_READ_BLOCKS fnpReadBlocks
Function Pointer, to read a block(s) from a block device.
void * pParam
Pointer to some parameters e.g. for a Low-Level Driver Handle.
FF_T_UINT16 devBlkSize
Block size that the driver deals with.
FullFAT handles memory with buffers, described as below.
FF_T_UINT32 Sector
The LBA of the Cached sector.
FF_T_UINT8 Mode
Read or Write mode.
FF_T_BOOL Modified
If the sector was modified since read.
FF_T_BOOL Valid
Initially FALSE.
FF_T_UINT32 LRU
For the Least Recently Used algorithm.
FF_T_UINT16 NumHandles
Number of objects using this buffer.
FF_T_UINT8 * pBuffer
Pointer to the cache block.
FF_T_UINT16 Persistance
For the persistance algorithm.
FF_IOMAN Object. A developer should not touch these values.
FF_T_UINT8 Locks
Lock Flag for FAT & DIR Locking etc (This must be accessed via a semaphore).
FF_BLK_DEVICE * pBlkDevice
Pointer to a Block device description.
void * pSemaphore
Pointer to a Semaphore object. (For buffer description modifications only!).
FF_PARTITION * pPartition
Pointer to a partition description.
void * FirstFile
Pointer to the first File object.
FF_T_UINT16 BlkSize
The Block size that IOMAN is configured to.
FF_T_UINT16 CacheSize
Size of the cache in number of Sectors.
FF_T_UINT8 MemAllocation
Bit-Mask identifying allocated pointers.
FF_BUFFER * pBuffers
Pointer to the first buffer description.
FF_T_UINT8 * pCacheMem
Pointer to a block of memory for the cache.
FF_T_UINT8 PreventFlush
Flushing to disk only allowed when 0.
void * pBlkDevSemaphore
Semaphore to guarantee Atomic access to the underlying block device, if required.
FF_T_UINT32 LastReplaced
Marks which sector was last replaced in the cache.
FullFAT identifies a partition with the following data.
FF_T_UINT32 BeginLBA
LBA start address of the partition.
FF_T_UINT32 FirstDataSector
FF_T_UINT32 ClusterBeginLBA
LBA of first cluster.
FF_T_UINT16 BlkSize
Size of a Sector Block in bytes.
FF_T_UINT32 SectorsPerFAT
Number of sectors per Fat.
FF_T_UINT32 NumClusters
Number of clusters.
FF_T_UINT32 RootDirSectors
FF_T_UINT32 FatBeginLBA
LBA of the FAT tables.
FF_T_UINT8 BlkFactor
Scale Factor for blocksizes above 512!
FF_T_UINT32 LastFreeCluster
FF_T_UINT8 Type
Partition Type Identifier.
FF_T_UINT32 RootDirCluster
Cluster number of the root directory entry.
FF_T_UINT32 PartSize
Size of Partition in number of sectors.
FF_T_UINT8 SectorsPerCluster
Number of sectors per Cluster.
FF_T_UINT32 FreeClusterCount
Records free space on mount.
FF_T_BOOL PartitionMounted
FF_TRUE if the partition is mounted, otherwise FF_FALSE.
FF_T_UINT16 ReservedSectors
FF_T_UINT8 NumFATS
Number of FAT tables.
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_ ULONG _In_ ULONG PartitionNumber