FreeRDP
scard.h
1
21
#ifndef FREERDP_CHANNEL_SCARD_H
22
#define FREERDP_CHANNEL_SCARD_H
23
24
#include <winpr/crt.h>
25
#include <winpr/smartcard.h>
26
27
#ifdef __cplusplus
28
extern
"C"
29
{
30
#endif
31
32
#define RDP_SCARD_CTL_CODE(code) \
33
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, (code), METHOD_BUFFERED, FILE_ANY_ACCESS)
34
35
#define SCARD_IOCTL_ESTABLISHCONTEXT RDP_SCARD_CTL_CODE(5)
/* SCardEstablishContext */
36
#define SCARD_IOCTL_RELEASECONTEXT RDP_SCARD_CTL_CODE(6)
/* SCardReleaseContext */
37
#define SCARD_IOCTL_ISVALIDCONTEXT RDP_SCARD_CTL_CODE(7)
/* SCardIsValidContext */
38
#define SCARD_IOCTL_LISTREADERGROUPSA RDP_SCARD_CTL_CODE(8)
/* SCardListReaderGroupsA */
39
#define SCARD_IOCTL_LISTREADERGROUPSW RDP_SCARD_CTL_CODE(9)
/* SCardListReaderGroupsW */
40
#define SCARD_IOCTL_LISTREADERSA RDP_SCARD_CTL_CODE(10)
/* SCardListReadersA */
41
#define SCARD_IOCTL_LISTREADERSW RDP_SCARD_CTL_CODE(11)
/* SCardListReadersW */
42
#define SCARD_IOCTL_INTRODUCEREADERGROUPA RDP_SCARD_CTL_CODE(20)
/* SCardIntroduceReaderGroupA */
43
#define SCARD_IOCTL_INTRODUCEREADERGROUPW RDP_SCARD_CTL_CODE(21)
/* SCardIntroduceReaderGroupW */
44
#define SCARD_IOCTL_FORGETREADERGROUPA RDP_SCARD_CTL_CODE(22)
/* SCardForgetReaderGroupA */
45
#define SCARD_IOCTL_FORGETREADERGROUPW RDP_SCARD_CTL_CODE(23)
/* SCardForgetReaderGroupW */
46
#define SCARD_IOCTL_INTRODUCEREADERA RDP_SCARD_CTL_CODE(24)
/* SCardIntroduceReaderA */
47
#define SCARD_IOCTL_INTRODUCEREADERW RDP_SCARD_CTL_CODE(25)
/* SCardIntroduceReaderW */
48
#define SCARD_IOCTL_FORGETREADERA RDP_SCARD_CTL_CODE(26)
/* SCardForgetReaderA */
49
#define SCARD_IOCTL_FORGETREADERW RDP_SCARD_CTL_CODE(27)
/* SCardForgetReaderW */
50
#define SCARD_IOCTL_ADDREADERTOGROUPA RDP_SCARD_CTL_CODE(28)
/* SCardAddReaderToGroupA */
51
#define SCARD_IOCTL_ADDREADERTOGROUPW RDP_SCARD_CTL_CODE(29)
/* SCardAddReaderToGroupW */
52
#define SCARD_IOCTL_REMOVEREADERFROMGROUPA \
53
RDP_SCARD_CTL_CODE(30)
/* SCardRemoveReaderFromGroupA \
54
*/
55
#define SCARD_IOCTL_REMOVEREADERFROMGROUPW \
56
RDP_SCARD_CTL_CODE(31)
/* SCardRemoveReaderFromGroupW \
57
*/
58
#define SCARD_IOCTL_LOCATECARDSA RDP_SCARD_CTL_CODE(38)
/* SCardLocateCardsA */
59
#define SCARD_IOCTL_LOCATECARDSW RDP_SCARD_CTL_CODE(39)
/* SCardLocateCardsW */
60
#define SCARD_IOCTL_GETSTATUSCHANGEA RDP_SCARD_CTL_CODE(40)
/* SCardGetStatusChangeA */
61
#define SCARD_IOCTL_GETSTATUSCHANGEW RDP_SCARD_CTL_CODE(41)
/* SCardGetStatusChangeW */
62
#define SCARD_IOCTL_CANCEL RDP_SCARD_CTL_CODE(42)
/* SCardCancel */
63
#define SCARD_IOCTL_CONNECTA RDP_SCARD_CTL_CODE(43)
/* SCardConnectA */
64
#define SCARD_IOCTL_CONNECTW RDP_SCARD_CTL_CODE(44)
/* SCardConnectW */
65
#define SCARD_IOCTL_RECONNECT RDP_SCARD_CTL_CODE(45)
/* SCardReconnect */
66
#define SCARD_IOCTL_DISCONNECT RDP_SCARD_CTL_CODE(46)
/* SCardDisconnect */
67
#define SCARD_IOCTL_BEGINTRANSACTION RDP_SCARD_CTL_CODE(47)
/* SCardBeginTransaction */
68
#define SCARD_IOCTL_ENDTRANSACTION RDP_SCARD_CTL_CODE(48)
/* SCardEndTransaction */
69
#define SCARD_IOCTL_STATE RDP_SCARD_CTL_CODE(49)
/* SCardState */
70
#define SCARD_IOCTL_STATUSA RDP_SCARD_CTL_CODE(50)
/* SCardStatusA */
71
#define SCARD_IOCTL_STATUSW RDP_SCARD_CTL_CODE(51)
/* SCardStatusW */
72
#define SCARD_IOCTL_TRANSMIT RDP_SCARD_CTL_CODE(52)
/* SCardTransmit */
73
#define SCARD_IOCTL_CONTROL RDP_SCARD_CTL_CODE(53)
/* SCardControl */
74
#define SCARD_IOCTL_GETATTRIB RDP_SCARD_CTL_CODE(54)
/* SCardGetAttrib */
75
#define SCARD_IOCTL_SETATTRIB RDP_SCARD_CTL_CODE(55)
/* SCardSetAttrib */
76
#define SCARD_IOCTL_ACCESSSTARTEDEVENT RDP_SCARD_CTL_CODE(56)
/* SCardAccessStartedEvent */
77
#define SCARD_IOCTL_RELEASETARTEDEVENT RDP_SCARD_CTL_CODE(57)
/* SCardReleaseStartedEvent */
78
#define SCARD_IOCTL_LOCATECARDSBYATRA RDP_SCARD_CTL_CODE(58)
/* SCardLocateCardsByATRA */
79
#define SCARD_IOCTL_LOCATECARDSBYATRW RDP_SCARD_CTL_CODE(59)
/* SCardLocateCardsByATRW */
80
#define SCARD_IOCTL_READCACHEA RDP_SCARD_CTL_CODE(60)
/* SCardReadCacheA */
81
#define SCARD_IOCTL_READCACHEW RDP_SCARD_CTL_CODE(61)
/* SCardReadCacheW */
82
#define SCARD_IOCTL_WRITECACHEA RDP_SCARD_CTL_CODE(62)
/* SCardWriteCacheA */
83
#define SCARD_IOCTL_WRITECACHEW RDP_SCARD_CTL_CODE(63)
/* SCardWriteCacheW */
84
#define SCARD_IOCTL_GETTRANSMITCOUNT RDP_SCARD_CTL_CODE(64)
/* SCardGetTransmitCount */
85
#define SCARD_IOCTL_GETREADERICON RDP_SCARD_CTL_CODE(65)
/* SCardGetReaderIconA */
86
#define SCARD_IOCTL_GETDEVICETYPEID RDP_SCARD_CTL_CODE(66)
/* SCardGetDeviceTypeIdA */
87
88
#pragma pack(push, 1)
89
90
/* interface type_scard_pack */
91
/* [unique][version][uuid] */
92
93
typedef
struct
94
{
95
/* [range] */
DWORD cbContext;
96
/* [size_is][unique] */
BYTE pbContext[8];
97
}
REDIR_SCARDCONTEXT
;
98
99
typedef
struct
100
{
101
/* [range] */
DWORD cbHandle;
102
/* [size_is] */
BYTE pbHandle[8];
103
}
REDIR_SCARDHANDLE
;
104
105
typedef
struct
106
{
107
LONG ReturnCode;
108
}
Long_Return
;
109
110
typedef
struct
111
{
112
LONG ReturnCode;
113
/* [range] */
DWORD cBytes;
114
/* [size_is][unique] */
BYTE* msz;
115
}
ListReaderGroups_Return
,
ListReaders_Return
;
116
117
typedef
struct
118
{
119
LONG ReturnCode;
120
REDIR_SCARDCONTEXT
hContext;
121
}
EstablishContext_Return
;
122
123
typedef
struct
124
{
125
DWORD dwCurrentState;
126
DWORD dwEventState;
127
/* [range] */
DWORD cbAtr;
128
BYTE rgbAtr[36];
129
}
ReaderState_Return
;
130
131
typedef
struct
132
{
133
/* [range] */
DWORD cbAtr;
134
BYTE rgbAtr[36];
135
BYTE rgbMask[36];
136
}
LocateCards_ATRMask
;
137
138
typedef
struct
139
{
140
LONG ReturnCode;
141
/* [range] */
DWORD cReaders;
142
/* [size_is] */
ReaderState_Return
* rgReaderStates;
143
}
LocateCards_Return
,
GetStatusChange_Return
;
144
145
typedef
struct
146
{
147
LONG ReturnCode;
148
ULONG cbDataLen;
149
BYTE* pbData;
150
}
GetReaderIcon_Return
;
151
152
typedef
struct
153
{
154
LONG ReturnCode;
155
ULONG dwDeviceId;
156
}
GetDeviceTypeId_Return
;
157
158
typedef
struct
159
{
160
LONG ReturnCode;
161
REDIR_SCARDCONTEXT
hContext;
162
REDIR_SCARDHANDLE
hCard;
163
DWORD dwActiveProtocol;
164
}
Connect_Return
;
165
166
typedef
struct
167
{
168
LONG ReturnCode;
169
DWORD dwActiveProtocol;
170
}
Reconnect_Return
;
171
172
typedef
struct
173
{
174
LONG ReturnCode;
175
DWORD dwState;
176
DWORD dwProtocol;
177
/* [range] */
DWORD cbAtrLen;
178
/* [size_is][unique] */
BYTE rgAtr[36];
179
}
State_Return
;
180
181
typedef
struct
182
{
183
LONG ReturnCode;
184
/* [range] */
DWORD cBytes;
185
/* [size_is][unique] */
BYTE* mszReaderNames;
186
DWORD dwState;
187
DWORD dwProtocol;
188
BYTE pbAtr[32];
189
/* [range] */
DWORD cbAtrLen;
190
}
Status_Return
;
191
192
typedef
struct
193
{
194
DWORD dwProtocol;
195
/* [range] */
DWORD cbExtraBytes;
196
/* [size_is][unique] */
BYTE* pbExtraBytes;
197
}
SCardIO_Request
;
198
199
typedef
struct
200
{
201
LONG ReturnCode;
202
/* [unique] */
LPSCARD_IO_REQUEST
pioRecvPci;
203
/* [range] */
DWORD cbRecvLength;
204
/* [size_is][unique] */
BYTE* pbRecvBuffer;
205
}
Transmit_Return
;
206
207
typedef
struct
208
{
209
LONG ReturnCode;
210
DWORD cTransmitCount;
211
}
GetTransmitCount_Return
;
212
213
typedef
struct
214
{
215
LONG ReturnCode;
216
/* [range] */
DWORD cbOutBufferSize;
217
/* [size_is][unique] */
BYTE* pvOutBuffer;
218
}
Control_Return
;
219
220
typedef
struct
221
{
222
LONG ReturnCode;
223
/* [range] */
DWORD cbAttrLen;
224
/* [size_is][unique] */
BYTE* pbAttr;
225
}
GetAttrib_Return
;
226
227
typedef
struct
228
{
229
LONG ReturnCode;
230
/* [range] */
DWORD cbDataLen;
231
/* [size_is][unique] */
BYTE* pbData;
232
}
ReadCache_Return
;
233
#pragma pack(pop)
234
235
typedef
struct
236
{
237
REDIR_SCARDCONTEXT
hContext;
238
REDIR_SCARDHANDLE
hCard;
239
}
Handles_Call
;
240
241
typedef
struct
242
{
243
Handles_Call
handles;
244
LONG fmszGroupsIsNULL;
245
DWORD cchGroups;
246
}
ListReaderGroups_Call
;
247
248
typedef
struct
249
{
250
Handles_Call
handles;
251
/* [range] */
DWORD cBytes;
252
/* [size_is][unique] */
BYTE* mszGroups;
253
LONG fmszReadersIsNULL;
254
DWORD cchReaders;
255
}
ListReaders_Call
;
256
257
typedef
struct
258
{
259
Handles_Call
handles;
260
DWORD dwTimeOut;
261
/* [range] */
DWORD cReaders;
262
/* [size_is] */
LPSCARD_READERSTATEA
rgReaderStates;
263
}
GetStatusChangeA_Call
;
264
265
typedef
struct
266
{
267
Handles_Call
handles;
268
/* [range] */
DWORD cBytes;
269
/* [size_is] */
CHAR* mszCards;
270
/* [range] */
DWORD cReaders;
271
/* [size_is] */
LPSCARD_READERSTATEA
rgReaderStates;
272
}
LocateCardsA_Call
;
273
274
typedef
struct
275
{
276
Handles_Call
handles;
277
/* [range] */
DWORD cBytes;
278
/* [size_is] */
WCHAR* mszCards;
279
/* [range] */
DWORD cReaders;
280
/* [size_is] */
LPSCARD_READERSTATEW
rgReaderStates;
281
}
LocateCardsW_Call
;
282
283
typedef
struct
284
{
285
Handles_Call
handles;
286
/* [range] */
DWORD cAtrs;
287
/* [size_is] */
LocateCards_ATRMask
* rgAtrMasks;
288
/* [range] */
DWORD cReaders;
289
/* [size_is] */
LPSCARD_READERSTATEA
rgReaderStates;
290
}
LocateCardsByATRA_Call
;
291
292
typedef
struct
293
{
294
Handles_Call
handles;
295
/* [range] */
DWORD cAtrs;
296
/* [size_is] */
LocateCards_ATRMask
* rgAtrMasks;
297
/* [range] */
DWORD cReaders;
298
/* [size_is] */
LPSCARD_READERSTATEW
rgReaderStates;
299
}
LocateCardsByATRW_Call
;
300
301
typedef
struct
302
{
303
Handles_Call
handles;
304
DWORD dwTimeOut;
305
/* [range] */
DWORD cReaders;
306
/* [size_is] */
LPSCARD_READERSTATEW
rgReaderStates;
307
}
GetStatusChangeW_Call
;
308
309
typedef
struct
310
{
311
Handles_Call
handles;
312
WCHAR* szReaderName;
313
}
GetReaderIcon_Call
;
314
315
typedef
struct
316
{
317
Handles_Call
handles;
318
WCHAR* szReaderName;
319
}
GetDeviceTypeId_Call
;
320
321
typedef
struct
322
{
323
Handles_Call
handles;
324
DWORD dwShareMode;
325
DWORD dwPreferredProtocols;
326
}
Connect_Common_Call
;
327
328
typedef
struct
329
{
330
Connect_Common_Call
Common;
331
/* [string] */
CHAR* szReader;
332
}
ConnectA_Call
;
333
334
typedef
struct
335
{
336
Connect_Common_Call
Common;
337
/* [string] */
WCHAR* szReader;
338
}
ConnectW_Call
;
339
340
typedef
struct
341
{
342
Handles_Call
handles;
343
DWORD dwShareMode;
344
DWORD dwPreferredProtocols;
345
DWORD dwInitialization;
346
}
Reconnect_Call
;
347
348
typedef
struct
349
{
350
Handles_Call
handles;
351
DWORD dwDisposition;
352
}
HCardAndDisposition_Call
;
353
354
typedef
struct
355
{
356
Handles_Call
handles;
357
LONG fpbAtrIsNULL;
358
DWORD cbAtrLen;
359
}
State_Call
;
360
361
typedef
struct
362
{
363
Handles_Call
handles;
364
LONG fmszReaderNamesIsNULL;
365
DWORD cchReaderLen;
366
DWORD cbAtrLen;
367
}
Status_Call
;
368
369
typedef
struct
370
{
371
Handles_Call
handles;
372
LPSCARD_IO_REQUEST
pioSendPci;
373
/* [range] */
DWORD cbSendLength;
374
/* [size_is] */
BYTE* pbSendBuffer;
375
/* [unique] */
LPSCARD_IO_REQUEST
pioRecvPci;
376
LONG fpbRecvBufferIsNULL;
377
DWORD cbRecvLength;
378
}
Transmit_Call
;
379
380
typedef
struct
381
{
382
Handles_Call
handles;
383
LONG LongValue;
384
}
Long_Call
;
385
386
typedef
struct
387
{
388
Handles_Call
handles;
389
}
Context_Call
;
390
391
typedef
struct
392
{
393
Handles_Call
handles;
394
/* [string] */
char
* sz;
395
}
ContextAndStringA_Call
;
396
397
typedef
struct
398
{
399
Handles_Call
handles;
400
/* [string] */
WCHAR* sz;
401
}
ContextAndStringW_Call
;
402
403
typedef
struct
404
{
405
Handles_Call
handles;
406
/* [string] */
char
* sz1;
407
/* [string] */
char
* sz2;
408
}
ContextAndTwoStringA_Call
;
409
410
typedef
struct
411
{
412
Handles_Call
handles;
413
/* [string] */
WCHAR* sz1;
414
/* [string] */
WCHAR* sz2;
415
}
ContextAndTwoStringW_Call
;
416
417
typedef
struct
418
{
419
Handles_Call
handles;
420
DWORD dwScope;
421
}
EstablishContext_Call
;
422
423
typedef
struct
424
{
425
Handles_Call
handles;
426
}
GetTransmitCount_Call
;
427
428
typedef
struct
429
{
430
Handles_Call
handles;
431
DWORD dwControlCode;
432
/* [range] */
DWORD cbInBufferSize;
433
/* [size_is][unique] */
BYTE* pvInBuffer;
434
LONG fpvOutBufferIsNULL;
435
DWORD cbOutBufferSize;
436
}
Control_Call
;
437
438
typedef
struct
439
{
440
Handles_Call
handles;
441
DWORD dwAttrId;
442
LONG fpbAttrIsNULL;
443
DWORD cbAttrLen;
444
}
GetAttrib_Call
;
445
446
typedef
struct
447
{
448
Handles_Call
handles;
449
DWORD dwAttrId;
450
/* [range] */
DWORD cbAttrLen;
451
/* [size_is] */
BYTE* pbAttr;
452
}
SetAttrib_Call
;
453
454
typedef
struct
455
{
456
Handles_Call
handles;
457
UUID* CardIdentifier;
458
DWORD FreshnessCounter;
459
LONG fPbDataIsNULL;
460
DWORD cbDataLen;
461
}
ReadCache_Common
;
462
463
typedef
struct
464
{
465
ReadCache_Common
Common;
466
/* [string] */
char
* szLookupName;
467
}
ReadCacheA_Call
;
468
469
typedef
struct
470
{
471
ReadCache_Common
Common;
472
/* [string] */
WCHAR* szLookupName;
473
}
ReadCacheW_Call
;
474
475
typedef
struct
476
{
477
Handles_Call
handles;
478
UUID* CardIdentifier;
479
DWORD FreshnessCounter;
480
/* [range] */
DWORD cbDataLen;
481
/* [size_is][unique] */
BYTE* pbData;
482
}
WriteCache_Common
;
483
484
typedef
struct
485
{
486
WriteCache_Common
Common;
487
/* [string] */
char
* szLookupName;
488
}
WriteCacheA_Call
;
489
490
typedef
struct
491
{
492
WriteCache_Common
Common;
493
/* [string] */
WCHAR* szLookupName;
494
}
WriteCacheW_Call
;
495
496
#ifdef __cplusplus
497
}
498
#endif
499
500
#endif
/* FREERDP_CHANNEL_SCARD_H */
ConnectA_Call
Definition:
scard.h:327
ConnectW_Call
Definition:
scard.h:333
Connect_Common_Call
Definition:
scard.h:320
Connect_Return
Definition:
scard.h:157
ContextAndStringA_Call
Definition:
scard.h:390
ContextAndStringW_Call
Definition:
scard.h:396
ContextAndTwoStringA_Call
Definition:
scard.h:402
ContextAndTwoStringW_Call
Definition:
scard.h:409
Context_Call
Definition:
scard.h:385
Control_Call
Definition:
scard.h:427
Control_Return
Definition:
scard.h:212
EstablishContext_Call
Definition:
scard.h:416
EstablishContext_Return
Definition:
scard.h:116
GetAttrib_Call
Definition:
scard.h:437
GetAttrib_Return
Definition:
scard.h:219
GetDeviceTypeId_Call
Definition:
scard.h:314
GetDeviceTypeId_Return
Definition:
scard.h:151
GetReaderIcon_Call
Definition:
scard.h:308
GetReaderIcon_Return
Definition:
scard.h:144
GetStatusChangeA_Call
Definition:
scard.h:256
GetStatusChangeW_Call
Definition:
scard.h:300
GetTransmitCount_Call
Definition:
scard.h:422
GetTransmitCount_Return
Definition:
scard.h:206
HCardAndDisposition_Call
Definition:
scard.h:347
Handles_Call
Definition:
scard.h:234
ListReaderGroups_Call
Definition:
scard.h:240
ListReaderGroups_Return
Definition:
scard.h:109
ListReaders_Call
Definition:
scard.h:247
LocateCardsA_Call
Definition:
scard.h:264
LocateCardsByATRA_Call
Definition:
scard.h:282
LocateCardsByATRW_Call
Definition:
scard.h:291
LocateCardsW_Call
Definition:
scard.h:273
LocateCards_ATRMask
Definition:
scard.h:130
LocateCards_Return
Definition:
scard.h:137
Long_Call
Definition:
scard.h:379
Long_Return
Definition:
scard.h:104
REDIR_SCARDCONTEXT
Definition:
scard.h:92
REDIR_SCARDHANDLE
Definition:
scard.h:98
ReadCacheA_Call
Definition:
scard.h:462
ReadCacheW_Call
Definition:
scard.h:468
ReadCache_Common
Definition:
scard.h:453
ReadCache_Return
Definition:
scard.h:226
ReaderState_Return
Definition:
scard.h:122
Reconnect_Call
Definition:
scard.h:339
Reconnect_Return
Definition:
scard.h:165
SCARD_IO_REQUEST
Definition:
include/winpr/smartcard.h:262
SCARD_READERSTATEA
Definition:
include/winpr/smartcard.h:377
SCARD_READERSTATEW
Definition:
include/winpr/smartcard.h:387
SCardIO_Request
Definition:
scard.h:191
SetAttrib_Call
Definition:
scard.h:445
State_Call
Definition:
scard.h:353
State_Return
Definition:
scard.h:171
Status_Call
Definition:
scard.h:360
Status_Return
Definition:
scard.h:180
Transmit_Call
Definition:
scard.h:368
Transmit_Return
Definition:
scard.h:198
WriteCacheA_Call
Definition:
scard.h:483
WriteCacheW_Call
Definition:
scard.h:489
WriteCache_Common
Definition:
scard.h:474
include
freerdp
channels
scard.h
Generated by
1.9.1