Share via


Block Driver Registry Settings

The Device Manager uses and manages several registry keys under the HKEY_LOCAL_MACHINE\Drivers registry key to load, track, and unload linear block device drivers. Built-in devices rely on the registry settings to be present at startup. These keys must be part of the default registry, which includes the registry keys and values that you install. You can install keys for removable block devices, such as linear flash memory PC Cards, on first use of the device.

This topic contains information about the following registry settings:

  • PC Card Block Device Registry Keys
  • Built-In Block Device Registry Keys
  • ATAPI Block Device Driver Registry Keys
  • Secure Digital Card Registry Settings

PC Card Block Device Registry Keys

To detect removable block devices, the Device Manager initiates a detection sequence to determine the specific device type.

The value of the Folder registry subkey under the HKEY_LOCAL_MACHINE\Drivers\PCMCIA\MyDriver registry key is optional. Its value determines the folder names that are associated with file system volumes. The default value is Storage Card for the first volume, Storage Card2 for the second, and so on. For example, if you use the value of the Folder registry subkey to change the folder name to My Folder, that is the name of the first device. The second folder is My Folder2, and so on. The block device driver reads the Folder registry subkey when the file system driver requests a folder name.

The HKEY_LOCAL_MACHINE\Drivers\PCMCIA\Detect\20 registry key is an example. The 20 registry subkey can be any other number. Its value determines the order in which the Device Manager tries the driver's MyDriverDetectdisk function relative to other drivers' detection functions when attempting to identify an unknown type of PC Card. For more information about the Device Manager, see Device Manager.

The Device Manager requires registry keys to initiate the detection sequence. The following registry key examples show how a PC Card driver named MyDriver uses registry keys:

[HKEY_LOCAL_MACHINE\Drivers\PCMCIA\MyDriver]
    "Prefix" = "XXX"
    "Dll" = "MyDriver.DLL"
    "Index" = DWORD:1
    "Order" = DWORD:1
    "IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
[HKEY_LOCAL_MACHINE\Drivers\PCMCIA\Detect\20]
    "Dll"="MyDriver.DLL"
    "Entry"="MyDriverDetectdisk"

Built-In Block Device Registry Keys

The HKEY_LOCAL_MACHINE\Drivers\BuiltIn registry key recognizes built-in block devices. The value of the Folder registry subkey is optional.

The following registry key example shows how a built-in driver called MyDriver should use the HKEY_LOCAL_MACHINE\Drivers\BuiltIn registry key:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MyDriver]
    "Prefix" = "XXX"
    "Dll" = "MyDriver.DLL"
    "Index" = DWORD:1
    "Order" = DWORD:1
    "IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"

ATAPI Block Device Driver Registry Keys

The ATAPI.dll file is a block driver that replaces the ATAdisk.dll driver and allows for support of both ATA as well as ATAPI functionality. This is from increased support for IDE and PCMCIA. The increase in IDE and PCMCIA support allows for greater compatibility with low-level device functionality such as DVD encryption and CD-ROM audio playback. For the ATAPI driver to function correctly, you must make an addition to the Platform.reg file.

The following registry key example shows the registry key to add to the Platform.ref file if the ATAPI device is located on the primary controller:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Atapi00]
    "Dll"="ATAPI.DLL"
    "Prefix"="XXX"
    "Ioctl"=dword:4
    "DeviceId"=dword:2
    "IOBaseAddress"=dword:1F0
    "Interrupt"=dword:0E
    "FSD"="fatfs.dll"

The following registry key example shows the registry key to add to the Platform.reg file if the ATAPI device is located on the secondary controller:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Atapi00]
    "Dll"="ATAPI.DLL"
    "Prefix"="XXX"
    "Ioctl"=dword:4
    "DeviceId"=dword:2"
    "IOBaseAddress"=dword:170
    "Interrupt"=dword:0F
    "FSD"="fatfs.dll"

Secure Digital Card Registry Settings

The following registry key examples show what you must implement.

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\sdmmc]
    "Dll" = "sdmmc.dll"
    "Prefix" = "DSK"
    "Order" = dword:1
    "IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMMC]
    "Name"="SD/MMC Card"
    "Folder"="Storage Card"

See Also

Block Driver Architecture | Block Driver Samples

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.