pcsc-lite  1.8.8
Macros | Functions
prothandler.h File Reference

This handles protocol defaults, PTS, etc. More...

Go to the source code of this file.

Macros

#define SET_PROTOCOL_WRONG_ARGUMENT   -1
 
#define SET_PROTOCOL_PPS_FAILED   -2
 

Functions

DWORD PHSetProtocol (struct ReaderContext *, DWORD, UCHAR, UCHAR)
 Determine which protocol to use. More...
 

Detailed Description

This handles protocol defaults, PTS, etc.

Definition in file prothandler.h.

Function Documentation

DWORD PHSetProtocol ( struct ReaderContext rContext,
DWORD  dwPreferred,
UCHAR  ucAvailable,
UCHAR  ucDefault 
)

Determine which protocol to use.

SCardConnect has a DWORD dwPreferredProtocols that is a bitmask of what protocols to use. Basically, if T=N where N is not zero will be used first if it is available in ucAvailable. Otherwise it will always default to T=0.

IFDSetPTS() is always called so that the driver can initialise its data

Definition at line 39 of file prothandler.c.

References IFD_NOT_SUPPORTED, IFD_PROTOCOL_NOT_SUPPORTED, IFD_SUCCESS, IFDSetPTS(), SCARD_PROTOCOL_T0, and SCARD_PROTOCOL_T1.

Referenced by SCardConnect(), and SCardReconnect().