Compartilhar via


CardRequestSocketMask (Windows CE 5.0)

Send Feedback

This function associates a socket and function pair with an event mask for the driver. Card services then restricts its future callbacks to the driver to those associated with the event mask passed to this function.

STATUS CardRequestSocketMask(CARD_CLIENT_HANDLEhCardClient,CARD_SOCKET_HANDLEhSock,UINT16fEventMask);

Parameters

  • hCardClient
    [in] Handle obtained from the CardRegisterClient function.

  • hSock
    [in] Handle to a socket and function pair.

  • fEventMask
    [in] Specifies a bitmask indicating the events that trigger a callback.

    The following table shows the PC card events that are allowed.

    Event mask Description
    EVENT_MASK_WRITE_PROTECT Write-protect state
    EVENT_MASK_CARD_LOCK Card lock state
    EVENT_MASK_EJECT_REQ Ejection request
    EVENT_MASK_INSERT_REQ Insertion request
    EVENT_MASK_BATTERY_DEAD Battery dead
    EVENT_MASK_BATTERY_LOW Battery low
    EVENT_MASK_CARD_READY Ready change
    EVENT_MASK_CARD_DETECT Card detect
    EVENT_MASK_POWER_MGMT Power management change
    EVENT_MASK_RESET Card reset
    EVENT_MASK_STATUS_CHANGE Card-generated status change interrupt

Return Values

CERR_SUCCESS indicates success. One of the following values indicates failure:

  • CERR_BAD_HANDLE
    Indicates that the driver handle specified for hCardClient is not valid.
  • CERR_BAD_SOCKET
    Indicates that the socket identifier specified for hSock is not valid.
  • CERR_OUT_OF_RESOURCE
    Indicates that insufficient memory is available to create a new event mask.

Remarks

An event mask should not be confused with the global event mask, which pertains to all sockets and is set by CardRegisterClient.

The CardSetEventMask function can change either a socket-specific event mask or the mask specified by CardRegisterClient.

The EVENT_MASK_POWER_MGMT, EVENT_MASK_RESET and EVENT_MASK_STATUS_CHANGE event masks should not be generated by the socket itself.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Cardserv.h.
Link Library: Cardserv.lib.

See Also

CardReleaseSocketMask | CardRegisterClient | CardSetEventMask

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.