Loading FSDs
FSDs are loaded automatically when a storage device that is registered for an FSD is inserted into a device.
When a PC Card, such as a storage card, is inserted into a device, the card's device driver reads the PC Card driver registry entry, which defines the name of the FSD to use for the card. For this discussion, the FSD is named MyFSD. When a user inserts a PC Card, a notification is sent to the Storage Manager. The Storage Manager mounts the appropriate partition driver and then loads the corresponding file system for the partition. While loading the file system, the Storage Manager checks in MyFSD for the FSD_MountDisk entry point, which is the generic exported entry point for MyFSD_MountDisk. If it is found, the Device Manager loads Fsdmgr.dll. The Device Manager then calls Fsdmgr.dll, passing in information about MyFSD.
The FSD Manager calls the MyFSD_MountDisk function that MyFSD.dll exports. The following table shows the two methods for loading an FSD.
File system | Method |
---|---|
Automatically loaded file systems | The HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad registry key specifies these file systems. They do not necessarily need any block driver under them. |
Block driver based file systems | If the block driver registry key contains the IClass registry subkey, which means that the Storage Manager manages it, then the Storage Manager loads the specified partition driver. For an example of the IClass registry subkey, see the ATADISK and ATAPI registry keys. Using the specified partition driver, the Storage Manager enumerates partitions and loads file systems. For more information on the Storage Manager, see Storage Manager. |
Because there are two methods of loading a file system, the actual file system is loaded multiple times with the help of the Storage Manager, and you can only call FSDMGR_RegisterVolume once per instance of an FSD.
The FSD Manager displays all volumes as directories in the built-in file system and makes them accessible to applications using the file system functions. Similarly, when the FSD's MyFSD_UnmountDisk entry point is called, it deregisters the volumes on the device. The following illustration shows how an FSD is loaded.
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.