다음을 통해 공유


RDF_CARD_POWER (Windows Embedded CE 6.0)

1/6/2010

The RDF_CARD_POWER callback function resets or powers down an inserted smart card. This callback function is mandatory.

Syntax

NTSTATUS (*ReaderFunction[RDF_CARD_POWER])(
  PSMARTCARD_EXTENSION SmartcardExtension
);

Parameters

  • SmartcardExtension
    [in] Points to the smart card extension of the device. In this SMARTCARD_EXTENSION structure, the MajorIoControlCode member must be set to IOCTL_SMARTCARD_POWER. And, the MinorIoControlCode member must contain one of the following minor codes, depending on the function to be performed.

    Minor code Description

    SCARD_COLD_RESET

    Performs a cold reset of the card.

    SCARD_WARM_RESET

    Performs a warm reset of the card.

    SCARD_POWER_DOWN

    Switches off card power.

    In this structure, the IoRequest.ReplyBufferLength value must be set to the length of the reply buffer.

    When the callback function returns, The IoRequest.ReplyBuffer member will contain the ATR returned by the card. In addition, you must transfer the ATR to CardCapabilities.ATR.Buffer to let the library parse the ATR. The Information member of the structure in the IoRequest member receives the actual length of the ATR. In addition, you must transfer the length of the ATR to CardCapabilities.ATR.Length.

Return Value

This function returns an NTSTATUS value. Possible values are the following.

Value Description

STATUS_SUCCESS

Function successfully executed.

STATUS_NO_MEDIA

No card is in the reader.

STATUS_IO_TIMEOUT

The request has timed out.

STATUS_BUFFER_TOO_SMALL

The user buffer is not large enough to hold the ATR.

Requirements

Header smclib.h
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

Smart Card Driver Functions
IOCTL_SMARTCARD_POWER