Using a PC Card Serial Device

Windows CE detects PC Cards when they are inserted or if they are in place when the user starts the H/PC. The system automatically loads the device drivers needed to use the card when it detects a supported card.

All active, top-level windows receive a WM_DEVICECHANGE message from the system when a card is first inserted. To determine if a card was inserted before the application started running, call the EnumPnpIds function. It returns a double-zero-terminated list of zero-terminated plug and play IDs of all active PC Cards. In most cases, the list returned from EnumPnpIds contains only one member because most H/PCs come equipped with only one PC Card slot.

Alternatively, TAPI applications can call the LineGetDevCaps function to determine if a particular modem is inserted into the H/PCs PCMCIA slot. The devSpecific member of the LineDevCaps structure returned from LineGetDevCaps contains the device type and indicates whether or not it is active.