In addition to the standard stream device driver functions, the ATADISK driver also exports a PC Card Plug and Play detection function, DetectATADisk. The detection function only reads the attribute space of the PC card; no other data is read, and no write operations are performed on the PC card. The function looks for disk device type 4 in the PC Card’s CISTPL_FUNCID tuple and for ATA device type 1 in the type 1 CISTPL_FUNCE tuple.
The presence of the \Drivers\PCMCIA\ATADisk\ key causes the Device Manager to call the driver’s DetectATADisk function when a PC Card is inserted and there is no driver associated with the card’s Plug and Play ID. The following example shows how this takes place.
HKEY_LOCAL_MACHINE
[Drivers]
[PCMCIA]
[Detect]
[50]
SZ: Dll = ATADisk.DLL
SZ: Entry = DetectATADisk
When DetectATADisk detects an ATA-compatible PC Card, it causes the Device Manager to load the driver listed in the \Drivers\PCMCIA\AtaDisk\ registry key. The following example shows how this done.
HKEY_LOCAL_MACHINE
[Drivers]
[PCMCIA]
[ATADISK]
SZ: Prefix = DSK
SZ: Dll = AtaDisk.DLL
SZ: IOCTL = (DWORD)4
SZ: FSD = FATFS.DLL
The four values shown are required.
The following values within the ATADISK key are optional. If present, these values affect all devices that the ATADISK driver operates on. Some of the following values are supported so that the ATADISK driver can work with some older ATA disk devices.