|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.|
The block device driver exposes standard stream interface functions that are common to all drivers controlled by the Device Manager. The following list shows the stream interface functions for a block device driver:
Note that the prefix "DSK_" is customary for block devices, which often include disk drives and other mass storage media. Block drivers can, however, have any legal device file name prefix. Furthermore, please note that the reference entries for the functions listed above describe Microsoft's sample implementations of these functions. OEMs or IHVs who are writing new block device drivers can modify the semantics of those functions — but not the syntax — to suit their devices' capabilities.
For more information about these stream interface functions, see Developing Stream Interface Device Drivers. In addition to the common stream interface API, the block device driver must also expose the following more specialized functions:
An entry point function for the device driver dynamic-link library (DLL). After the Device Manager calls LoadLibraryto map the DLL, the system calls MyDriverEntry. This function performs any initialization tasks that are necessary for the block device driver. Upon successful return from MyDriverEntry, the Device Manager associates the driver's stream interface functions with a special device file name so that applications can access the device. The first flash memory device is named DSK1:, the second DSK2:, and so on. DSK_ is the device file name prefix for all block device drivers. Note that MyDriverEntryis just a place holder for the actual name of your DLL's entry point.
The entry point for the block device driver's detection routine.
This routine should work like a normal detection function for a
stream interface driver; if this function is called when a block
device is connected to the Windows CE-based platform, then the
function should return true or false based on whether it can
control the block device.
Last updated on Tuesday, July 13, 2004