22 #ifndef WINPR_SMARTCARD_PCSC_PRIVATE_H
23 #define WINPR_SMARTCARD_PCSC_PRIVATE_H
27 #include <winpr/platform.h>
28 #include <winpr/smartcard.h>
49 typedef uint8_t PCSC_BYTE;
51 typedef uint8_t PCSC_UCHAR;
52 typedef PCSC_UCHAR* PCSC_PUCHAR;
53 typedef uint16_t PCSC_USHORT;
55 #ifndef __COREFOUNDATION_CFPLUGINCOM__
56 typedef uint32_t PCSC_ULONG;
57 typedef void* PCSC_LPVOID;
58 typedef int16_t PCSC_BOOL;
61 typedef PCSC_ULONG* PCSC_PULONG;
62 typedef const void* PCSC_LPCVOID;
63 typedef uint32_t PCSC_DWORD;
64 typedef PCSC_DWORD* PCSC_PDWORD;
65 typedef uint16_t PCSC_WORD;
66 typedef int32_t PCSC_LONG;
67 typedef const char* PCSC_LPCSTR;
68 typedef const PCSC_BYTE* PCSC_LPCBYTE;
69 typedef PCSC_BYTE* PCSC_LPBYTE;
70 typedef PCSC_DWORD* PCSC_LPDWORD;
71 typedef char* PCSC_LPSTR;
76 typedef unsigned char PCSC_BYTE;
78 typedef unsigned char PCSC_UCHAR;
79 typedef PCSC_UCHAR* PCSC_PUCHAR;
80 typedef unsigned short PCSC_USHORT;
82 #ifndef __COREFOUNDATION_CFPLUGINCOM__
83 typedef unsigned long PCSC_ULONG;
84 typedef void* PCSC_LPVOID;
87 typedef const void* PCSC_LPCVOID;
88 typedef unsigned long PCSC_DWORD;
89 typedef PCSC_DWORD* PCSC_PDWORD;
90 typedef long PCSC_LONG;
91 typedef const char* PCSC_LPCSTR;
92 typedef const PCSC_BYTE* PCSC_LPCBYTE;
93 typedef PCSC_BYTE* PCSC_LPBYTE;
94 typedef PCSC_DWORD* PCSC_LPDWORD;
95 typedef char* PCSC_LPSTR;
99 typedef PCSC_LPSTR PCSC_LPTSTR;
100 typedef PCSC_LPCSTR PCSC_LPCTSTR;
103 typedef short PCSC_BOOL;
104 typedef unsigned short PCSC_WORD;
105 typedef PCSC_ULONG* PCSC_PULONG;
109 #define PCSC_SCARD_UNKNOWN 0x0001
110 #define PCSC_SCARD_ABSENT 0x0002
111 #define PCSC_SCARD_PRESENT 0x0004
112 #define PCSC_SCARD_SWALLOWED 0x0008
113 #define PCSC_SCARD_POWERED 0x0010
114 #define PCSC_SCARD_NEGOTIABLE 0x0020
115 #define PCSC_SCARD_SPECIFIC 0x0040
117 #define PCSC_SCARD_PROTOCOL_RAW 0x00000004u
118 #define PCSC_SCARD_PROTOCOL_T15 0x00000008u
120 #define PCSC_MAX_BUFFER_SIZE 264
121 #define PCSC_MAX_BUFFER_SIZE_EXTENDED (4 + 3 + (1 << 16) + 3 + 2)
123 #define PCSC_MAX_ATR_SIZE 33
125 #define PCSC_SCARD_AUTOALLOCATE (PCSC_DWORD)(-1)
127 #define PCSC_SCARD_CTL_CODE(code) (0x42000000 + (code))
128 #define PCSC_CM_IOCTL_GET_FEATURE_REQUEST PCSC_SCARD_CTL_CODE(3400)
136 #pragma pack(push, 1)
143 PCSC_DWORD dwCurrentState;
144 PCSC_DWORD dwEventState;
146 BYTE rgbAtr[PCSC_MAX_ATR_SIZE];
151 PCSC_DWORD dwProtocol;
152 PCSC_DWORD cbPciLength;
159 #pragma pack(push, 1)
170 int PCSC_InitializeSCardApi(
void);