CLIENT_CALLBACK

CLIENT_CALLBACK specifies the prototype for PC Card event callback functions. The Card Services driver calls the callback function to notify the installable device driver of a PC Card event.

Syntax

typedef STATUS (*CLIENT_CALLBACK)( CARD_EVENT CardEvent CARD_SOCKET_HANDLE hSocket PCARD_EVENT_PARMS pCardEventParms );

Parameters

CardEvent
Contains one of the Card Services callback event codes.
hSocket
Contains a handle to a socket and function pair.
pCardEventParms
Points to the parameters associated with CardEvent.

Return Values

If the function succeeds, your callback function should return CERR_SUCCESS; otherwise, return one of the following:

CERR_BAD_ARGS
Indicates the pointer specified for pCardEventParms is invalid.
CERR_BAD_SOCKET
Indicates the socket identifier specified for hSocket is invalid or a PC Card is not inserted.

Remarks

When a PC Card event occurs, Card Services notifies drivers by calling their registered callback functions. The callback function must conform to the CLIENT_CALLBACK prototype.

Drivers can indicate for which events they want notification when they register with CardRegisterClient.

CardRequestSocketMask and CardSetEventMask can be used to request event notification for a specific socket and function pair.

See Also

CardRegisterClient, CardRequestSocketMask, CardSetEventMask, PC Card Event Codes

EnumPnpIds

The EnumPndIds function returns a list of Plug-and-play IDs currently known to the system. These represent Plug-and-play devices that are currently inserted into the Windows CE platform.

Syntax

DWORD EnumPnpIds( LPTSTR PnpList, LPDWORD lpBufLen );

Parameters

PnpList
The list of Plug-and-Play IDs
lpBufLen
The number of Plug-and-play IDs.