Share via


RDF_TRANSMIT (Windows CE 5.0)

Send Feedback

The RDF_TRANSMIT callback function performs data transmissions. This callback function is mandatory.

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

Parameters

  • SmartcardExtension
    [in] Points to the smart card extension of the device. SmartcardExtension->MajorIoControlCode contains IOCTL_SMARTCARD_TRANSMIT. SmartcardExtension->IoRequest.RequestBuffer points to an SCARD_IO_REQUEST structure followed by data to be transmitted to the card. SmartcardExtension->IoRequest.RequestBufferLength contains the number of bytes to be transmitted to the card. SmartcardExtension->IoRequest.ReplyBufferLength contains the size of the reply buffer. On output, SmartcardExtension->IoRequest.ReplyBuffer points to the buffer that receives the SCARD_IO_REQUEST structure, plus the result of the card, and SmartcardExtension->IoRequest.Information receives the actual number of bytes returned by the card, plus the size of SCARD_IO_REQUEST structure.

Return Values

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

Value Description
STATUS_SUCCESS Transmission successful.
STATUS_NO_MEDIA No card is in the reader.
STATUS_IO_TIMEOUT The request has timed out.
STATUS_INVALID_DEVICE_REQUEST The protocol defined by dwProtocol is invalid.

Remarks

When this function is called, SmartcardExtension->IoRequest.RequestBuffer points to a SCARD_IO_REQUEST structure followed by data to be transmitted.

The dwProtocol member must contain the protocol identifier that was returned by a call to IOCTL_SMARTCARD_SET_PROTOCOL.

The cbPciLength member contains the size of this structure, which is usually eight. This structure will be used mainly for future implementations.

The structure is followed by protocol data to be transmitted to the card. Depending on the protocol to be used for this transmission, the library offers several support functions. See SmartcardT1Request.

RequestBuffer and ReplyBuffer point to the same system buffer. If you use the library function SmartcardxxRequest and SmartcardxxReply, you do not have to worry that you might overwrite the input buffer. If you do not use these functions, make a copy of the RequestBuffer before you start transmissions.

The implementation requires you to copy the SCARD_IO_REQUEST structure to the ReplyBuffer, followed by the data received from the card. Again, if you use the SmartcardxxRequest and SmartcardxxReply functions, you do not need to copy the structure because the library does this.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Smclib.h.

See Also

SCARD_IO_REQUEST | IOCTL_SMARTCARD_SET_PROTOCOL | SmartcardT1Request

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.