summaryrefslogtreecommitdiffstats
path: root/sesman/chansrv/pcsc/wrapper/winscard-funcs.h
blob: d28e14451133f36917ace6bc7329f7d297c5bc2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

#ifndef _WINSCARD_FUNCS_H
#define _WINSCARD_FUNCS_H

typedef LONG WINAPI
(*tSCardEstablishContext)(DWORD dwScope, LPCVOID pvReserved1,
                          LPCVOID pvReserved2, LPSCARDCONTEXT phContext);
typedef LONG WINAPI
(*tSCardReleaseContext)(SCARDCONTEXT hContext);
typedef LONG WINAPI
(*tSCardIsValidContext)(SCARDCONTEXT hContext);
typedef LONG WINAPI
(*tSCardListReaderGroupsA)(SCARDCONTEXT hContext, LPSTR mszGroups,
                           LPDWORD pcchGroups);
typedef LONG WINAPI
(*tSCardListReaderGroupsW)(SCARDCONTEXT hContext, LPWSTR mszGroups,
                           LPDWORD pcchGroups);
typedef LONG WINAPI
(*tSCardListReadersA)(SCARDCONTEXT hContext, LPCSTR mszGroups,
                      LPSTR mszReaders, LPDWORD pcchReaders);
typedef LONG WINAPI
(*tSCardListReadersW)(SCARDCONTEXT hContext, LPCWSTR mszGroups,
                      LPWSTR mszReaders, LPDWORD pcchReaders);
typedef LONG WINAPI
(*tSCardListCardsA)(SCARDCONTEXT hContext, LPCBYTE pbAtr,
                    LPCGUID rgquidInterfaces, DWORD cguidInterfaceCount,
                    LPSTR mszCards, LPDWORD pcchCards);
typedef LONG WINAPI
(*tSCardListCardsW)(SCARDCONTEXT hContext, LPCBYTE pbAtr,
                    LPCGUID rgquidInterfaces, DWORD cguidInterfaceCount,
                    LPWSTR mszCards, LPDWORD pcchCards);
typedef LONG WINAPI
(*tSCardListInterfacesA)(SCARDCONTEXT hContext, LPCSTR szCard,
                         LPGUID pguidInterfaces, LPDWORD pcguidInterfaces);
typedef LONG WINAPI
(*tSCardListInterfacesW)(SCARDCONTEXT hContext, LPCWSTR szCard,
                         LPGUID pguidInterfaces, LPDWORD pcguidInterfaces);
typedef LONG WINAPI
(*tSCardGetProviderIdA)(SCARDCONTEXT hContext, LPCSTR szCard,
                        LPGUID pguidProviderId);
typedef LONG WINAPI
(*tSCardGetProviderIdW)(SCARDCONTEXT hContext, LPCWSTR szCard,
                        LPGUID pguidProviderId);
typedef LONG WINAPI
(*tSCardGetCardTypeProviderNameA)(SCARDCONTEXT hContext, LPCSTR szCardName,
                                  DWORD dwProviderId, LPSTR szProvider,
                                  LPDWORD pcchProvider);
typedef LONG WINAPI
(*tSCardGetCardTypeProviderNameW)(SCARDCONTEXT hContext, LPCWSTR szCardName,
                                  DWORD dwProviderId, LPWSTR szProvider,
                                  LPDWORD pcchProvider);
typedef LONG WINAPI
(*tSCardIntroduceReaderGroupA)(SCARDCONTEXT hContext, LPCSTR szGroupName);
typedef LONG WINAPI
(*tSCardIntroduceReaderGroupW)(SCARDCONTEXT hContext, LPCWSTR szGroupName);

typedef LONG WINAPI
(*tSCardForgetReaderGroupA)(SCARDCONTEXT hContext, LPCSTR szGroupName);
typedef LONG WINAPI
(*tSCardForgetReaderGroupW)(SCARDCONTEXT hContext, LPCWSTR szGroupName);
typedef LONG WINAPI
(*tSCardIntroduceReaderA)(SCARDCONTEXT hContext, LPCSTR szReaderName,
                          LPCSTR szDeviceName);
typedef LONG WINAPI
(*tSCardIntroduceReaderW)(SCARDCONTEXT hContext, LPCWSTR szReaderName,
                          LPCWSTR szDeviceName);
typedef LONG WINAPI
(*tSCardForgetReaderA)(SCARDCONTEXT hContext, LPCSTR szReaderName);
typedef LONG WINAPI
(*tSCardForgetReaderW)(SCARDCONTEXT hContext, LPCWSTR szReaderName);

typedef LONG WINAPI
(*tSCardAddReaderToGroupA)(SCARDCONTEXT hContext, LPCSTR szReaderName,
                           LPCSTR szGroupName);
typedef LONG WINAPI
(*tSCardAddReaderToGroupW)(SCARDCONTEXT hContext, LPCWSTR szReaderName,
                           LPCWSTR szGroupName);
typedef LONG WINAPI
(*tSCardRemoveReaderFromGroupA)(SCARDCONTEXT hContext, LPCSTR szReaderName,
                                LPCSTR szGroupName);
typedef LONG WINAPI
(*tSCardRemoveReaderFromGroupW)(SCARDCONTEXT hContext, LPCWSTR szReaderName,
                                LPCWSTR szGroupName);
typedef LONG WINAPI
(*tSCardIntroduceCardTypeA)(SCARDCONTEXT hContext, LPCSTR szCardName,
                            LPCGUID pguidPrimaryProvider,
                            LPCGUID rgguidInterfaces,
                            DWORD dwInterfaceCount, LPCBYTE pbAtr,
                            LPCBYTE pbAtrMask, DWORD cbAtrLen);
typedef LONG WINAPI
(*tSCardIntroduceCardTypeW)(SCARDCONTEXT hContext, LPCWSTR szCardName,
                            LPCGUID pguidPrimaryProvider,
                            LPCGUID rgguidInterfaces,
                            DWORD dwInterfaceCount, LPCBYTE pbAtr,
                            LPCBYTE pbAtrMask, DWORD cbAtrLen);
typedef LONG WINAPI
(*tSCardSetCardTypeProviderNameA)(SCARDCONTEXT hContext, LPCSTR szCardName,
                                  DWORD dwProviderId, LPCSTR szProvider);
typedef LONG WINAPI
(*tSCardSetCardTypeProviderNameW)(SCARDCONTEXT hContext, LPCWSTR szCardName,
                                  DWORD dwProviderId, LPCWSTR szProvider);
typedef LONG WINAPI
(*tSCardForgetCardTypeA)(SCARDCONTEXT hContext, LPCSTR szCardName);
typedef LONG WINAPI
(*tSCardForgetCardTypeW)(SCARDCONTEXT hContext, LPCWSTR szCardName);
typedef LONG WINAPI
(*tSCardFreeMemory)(SCARDCONTEXT hContext, LPCVOID pvMem);
typedef LONG WINAPI
(*tSCardLocateCardsA)(SCARDCONTEXT hContext, LPCSTR mszCards,
                      LPSCARD_READERSTATEA rgReaderStates, DWORD cReaders);
typedef LONG WINAPI
(*tSCardLocateCardsW)(SCARDCONTEXT hContext, LPCWSTR mszCards,
                      LPSCARD_READERSTATEW rgReaderStates, DWORD cReaders);
typedef LONG WINAPI
(*tSCardGetStatusChangeA)(SCARDCONTEXT hContext, DWORD dwTimeout,
                          LPSCARD_READERSTATEA rgReaderStates,
                          DWORD cReaders);
typedef LONG WINAPI
(*tSCardGetStatusChangeW)(SCARDCONTEXT hContext, DWORD dwTimeout,
                          LPSCARD_READERSTATEW rgReaderStates,
                          DWORD cReaders);
typedef LONG WINAPI
(*tSCardCancel)(SCARDCONTEXT hContext);
typedef LONG WINAPI
(*tSCardConnectA)(SCARDCONTEXT hContext, LPCSTR szReader,
                  DWORD dwShareMode, DWORD dwPreferredProtocols,
                  LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol);
typedef LONG WINAPI
(*tSCardConnectW)(SCARDCONTEXT hContext, LPCWSTR szReader,
                  DWORD dwShareMode, DWORD dwPreferredProtocols,
                  LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol);
typedef LONG WINAPI
(*tSCardReconnect)(SCARDHANDLE hCard, DWORD dwShareMode,
                   DWORD dwPreferredProtocols, DWORD dwInitialization,
                   LPDWORD pdwActiveProtocol);
typedef LONG WINAPI
(*tSCardDisconnect)(SCARDHANDLE hCard, DWORD dwDisposition);
typedef LONG WINAPI
(*tSCardBeginTransaction)(SCARDHANDLE hCard);
typedef LONG WINAPI
(*tSCardEndTransaction)(SCARDHANDLE hCard, DWORD dwDisposition);
typedef LONG WINAPI
(*tSCardCancelTransaction)(SCARDHANDLE hCard);
typedef LONG WINAPI
(*tSCardState)(SCARDHANDLE hCard, LPDWORD pdwState, LPDWORD pdwProtocol,
               LPBYTE pbAtr, LPDWORD pcbAtrLen);
typedef LONG WINAPI
(*tSCardStatusA)(SCARDHANDLE hCard, LPSTR szReaderName, LPDWORD pcchReaderLen,
                 LPDWORD pdwState, LPDWORD pdwProtocol, LPBYTE pbAtr,
                 LPDWORD pcbAtrLen);
typedef LONG WINAPI
(*tSCardStatusW)(SCARDHANDLE hCard, LPWSTR szReaderName, LPDWORD pcchReaderLen,
                 LPDWORD pdwState, LPDWORD pdwProtocol, LPBYTE pbAtr,
                 LPDWORD pcbAtrLen);
typedef LONG WINAPI
(*tSCardTransmit)(SCARDHANDLE hCard, LPCSCARD_IO_REQUEST pioSendPci,
                  LPCBYTE pbSendBuffer, DWORD cbSendLength,
                  LPSCARD_IO_REQUEST pioRecvPci, LPBYTE pbRecvBuffer,
                  LPDWORD pcbRecvLength);
typedef LONG WINAPI
(*tSCardControl)(SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID lpInBuffer,
                 DWORD nInBufferSize, LPVOID lpOutBuffer,
                 DWORD nOutBufferSize, LPDWORD lpBytesReturned);
typedef LONG WINAPI
(*tSCardGetAttrib)(SCARDHANDLE hCard, DWORD dwAttrId, LPBYTE pbAttr,
                   LPDWORD pcbAttrLen);
typedef LONG WINAPI
(*tSCardSetAttrib)(SCARDHANDLE hCard, DWORD dwAttrId, LPCBYTE pbAttr,
                   DWORD cbAttrLen);

#endif