|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
Block device drivers are for devices that allow data to be read or written only in blocks of a fixed size. Block devices do not allow individual bytes of data to be read or written. Block sizes tend to be one or a few kilobytes; some common sizes are 512 bytes, 1 KB, 2 KB, and 4 KB. Block devices are ideally suited to mass storage and persistent storage applications, such as disk drives or non-volatile RAM disks. The material in this section applies to writing device drivers for any type of block device. Some common types of block devices are hard disks and ATA-style flash memory disks in miniature card, PC Card, and compact flash card form factors.
Block device drivers for Windows CE can be implemented by using the stream interface driver model or a custom interface model. However, if you want your driver to interface with the FAT filesystem or FSDManager that are included with Windows CE, you should use the stream interface driver model. These drivers are managed by the Device Manager, and expose file I/O functions in order to interact with applications. The most important of those functions for block device drivers is the driver's DSK_IOControlfunction, which handles all I/O requests to block devices. The specific I/O control codes for DSK_IOControlare the same ones that Windows CE uses to interact with the file allocation table (FAT) file system driver.
Last updated on Tuesday, July 13, 2004