pcsc-lite 2.3.0
prothandler.h File Reference

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

#include "readerfactory.h"
#include "wintypes.h"

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.
 

Detailed Description

This handles protocol defaults, PTS, etc.

Definition in file prothandler.h.

Macro Definition Documentation

◆ SET_PROTOCOL_PPS_FAILED

#define SET_PROTOCOL_PPS_FAILED   -2

Definition at line 47 of file prothandler.h.

◆ SET_PROTOCOL_WRONG_ARGUMENT

#define SET_PROTOCOL_WRONG_ARGUMENT   -1

Definition at line 46 of file prothandler.h.

Function Documentation

◆ PHSetProtocol()

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 60 of file prothandler.c.