There are two methods for accessing block devices, depending on whether the device is built into a Windows CE–based platform or whether the device is removable by the user.
Drivers for built-in block devices access their devices by mapping the device’s address space directly into the operating system’s address space. The driver should use the MMapIOSpace function to map the block device into system memory.
Block device drivers for removable block devices need to use a memory window to access their devices. The driver should use the VirtualAlloc and VirtualCopy functions to create the window, which the PC Card Services library can then use to read and write data between the driver and the block device.