Drivers\PCMCIA\Plug-and-Play ID

The Drivers\PCMCIA\ key contains subkeys for known PC Cards. Each subkey is the card’s Plug and Play identifier. The values within a Plug-and-Play ID subkey define the values for a PC Card device with a matching Plug and Play identifier.

The following table shows the required values for this subkey. Additional values can be stored for purposes specific to the device.

Value name
Value type
Description
Dll REG_SZ This value specifies the file name for the DLL that contains the stream interface driver. The Device Manager loads the DLL.
Prefix REG_SZ This value specifies the device driver’s device file name prefix. It is a three character identifier, such as COM.
Index REG_DWORD This optional value specifies the device index (from 0 through 9) that the Device Manager assigns to the driver. If the Index value is not present, the Device Manager assigns the lowest index value available. This index is associated with the device. Only index values from 0 through 9 are allowed.
Context REG_DWORD This optional value specifies the device context. If the Context value is present— that is, if it was initialized by the device’s setup application—the Device Manager passes it as the dwInfo parameter to the RegisterDevice function. If it is not present, a pointer to a string containing the registry path to the device’s Drivers\Active\ key is passed as the parameter. The driver’s initialization function then can open this key to read its information. To let the driver read the Drivers\Active key data, do not initialize the Context value.
Ioctl REG_DWORD This optional value specifies an I/O control code that the Device Manager sends to a stream interface driver after loading the driver. If the Ioctl value is present, the Device Manager opens the loaded driver and calls its XXX_IOControl function, passing the I/O control code specified by the Ioctl value. The driver can do any necessary post-initialization in this context. For example, the driver can load modules that use the device.

In addition, the Device Manager broadcasts a WM_DEVICECHANGE message for the new device, and it signals the application notification system by means of the CeEventHasOccurred function, passing it the NOTIFICATION_EVENT_DEVICE_CHANGE message.


The following example shows the registry key for the Motorola NewsCard pager. When the Device Manager matches the pager’s Plug and Play identifier with the registry key, it loads Newscard.dll and registers a device for the NewsCard driver. Because the Index value is specified, the Device Manager registers the pager device as the “PGR1:” device. If no Index value is present, the Device Manager selects an appropriate device index, probably 1 unless another device driver already has registered “PGR1:”. However, when an index is specified, the device driver can support only one PC Card of this type because Device Manager cannot register the card under any device name other than “PGR1:”.

HKEY_LOCAL_MACHINE
    [Drivers]
        [PCMCIA]
            [Motorola,_Inc.-NewsCard_Data_Receiver-E6DD]
                DWORD: Index = 0x1
                SZ: Prefix = PGR
                SZ: Dll = NEWSCARD.DLL