Drivers for PC Card Devices

Stream interface drivers for PC Cards are more complex than drivers for serial devices because PC Cards themselves tend to be more complex. As described in System Architecture for Stream Interface Drivers, stream interface drivers access peripheral devices through built-in hardware. For PC Cards, the built-in hardware is the PC Card socket or sockets available on a Windows CE–based platform. Specifically, these sockets are PC Card Type II sockets. The sockets are driven by the built-in PC Card socket driver, which implements the socket functions that you use to write stream interface drivers for PC Cards.

Most PC Card socket functions have a parameter that represents a socket and function pair. A socket and function pair is a combination of one particular PC Card socket and one particular function of a PC Card. Socket and function pairs support multifunction PC Cards and platforms with more than one PC Card socket. Drivers for multifunction cards should register one device file name for each function. Any drivers that you create for PC Cards should also be written to work with any PC Card socket because different platforms have different numbers of sockets.

If you write a generic PC Card driver—one that can drive an entire class of PC Cards adhering to a specified operating standard—you need an additional entry point in the DLL for a detection function. The Device Manager uses the detection function when a user inserts an unknown PC Card with no Plug and Play identifier. This function must conform to the PFN_DETECT_ENTRY prototype declared in Public\Common\DDK\Inc\DevLoad.h. For more information on PC Card detection functions, see Device Manager and Drivers\PCMCIA\Detect.