ReactOS  0.4.14-dev-323-g6fe6a88
winscard.h
Go to the documentation of this file.
1 /*
2  * Winscard definitions
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #ifndef __WINE_WINSCARD_H
20 #define __WINE_WINSCARD_H
21 
22 #include <wtypes.h>
23 #include <winioctl.h>
24 #include <winsmcrd.h>
25 #include <scarderr.h>
26 
27 /* Valid scopes for contexts */
28 #define SCARD_SCOPE_USER 0
29 #define SCARD_SCOPE_TERMINAL 1
30 #define SCARD_SCOPE_SYSTEM 2
31 
32 #ifndef _LPCBYTE_DEFINED
33 #define _LPCBYTE_DEFINED
34 typedef const BYTE *LPCBYTE;
35 #endif
36 
39 
40 typedef struct _SCARD_ATRMASK
41 {
43  BYTE rgbAtr[36];
46 
47 typedef struct
48 {
54  BYTE rgbAtr[36];
56 typedef struct
57 {
63  BYTE rgbAtr[36];
65 DECL_WINELIB_TYPE_AW(SCARD_READERSTATE)
66 DECL_WINELIB_TYPE_AW(PSCARD_READERSTATE)
67 DECL_WINELIB_TYPE_AW(LPSCARD_READERSTATE)
68 
69 
70 #ifdef __cplusplus
71 extern "C" {
72 #endif
73 
77 #define SCardAddReaderToGroup WINELIB_NAME_AW(SCardAddReaderToGroup)
82 #define SCardConnect WINELIB_NAME_AW(SCardConnect)
89 #define SCardForgetCardType WINELIB_NAME_AW(SCardForgetCardType)
92 #define SCardForgetReader WINELIB_NAME_AW(SCardForgetReader)
95 #define SCardForgetReaderGroup WINELIB_NAME_AW(SCardForgetReaderGroup)
100 #define SCardGetCardTypeProviderName WINELIB_NAME_AW(SCardGetCardTypeProviderName)
103 #define SCardGetProviderId WINELIB_NAME_AW(SCardGetProviderId)
106 #define SCardGetStatusChange WINELIB_NAME_AW(SCardGetStatusChange)
109 #define SCardIntroduceCardType WINELIB_NAME_AW(SCardIntroduceCardType)
112 #define SCardIntroduceReader WINELIB_NAME_AW(SCardIntroduceReader)
115 #define SCardIntroduceReaderGroup WINELIB_NAME_AW(SCardIntroduceReaderGroup)
119 #define SCardListCards WINELIB_NAME_AW(SCardListCards)
122 #define SCardListInterfaces WINELIB_NAME_AW(SCardListInterfaces)
125 #define SCardListReaders WINELIB_NAME_AW(SCardListReaders)
128 #define SCardListReaderGroups WINELIB_NAME_AW(SCardListReaderGroups)
131 #define SCardLocateCards WINELIB_NAME_AW(SCardLocateCards)
134 #define SCardLocateCardsByATR WINELIB_NAME_AW(SCardLocateCardsByATR)
140 #define SCardRemoveReaderFromGroup WINELIB_NAME_AW(SCardRemoveReaderFromGroup)
144 #define SCardSetCardTypeProviderName WINELIB_NAME_AW(SCardSetCardTypeProviderName)
148 #define SCardStatus WINELIB_NAME_AW(SCardStatus)
150 
151 #ifdef __cplusplus
152 }
153 #endif
154 
155 #endif /* __WINE_WINSCARD_H */
LONG WINAPI SCardConnectW(SCARDCONTEXT, LPCWSTR, DWORD, DWORD, LPSCARDHANDLE, LPDWORD)
Definition: stubs.c:58
LONG WINAPI SCardGetStatusChangeA(SCARDCONTEXT, DWORD, LPSCARD_READERSTATEA, DWORD)
Definition: stubs.c:269
LONG WINAPI SCardIntroduceReaderGroupW(SCARDCONTEXT, LPCWSTR)
Definition: stubs.c:371
LONG WINAPI SCardListCardsA(SCARDCONTEXT, LPCBYTE, LPCGUID, DWORD, LPSTR, LPDWORD)
Definition: winscard.c:100
LONG WINAPI SCardForgetReaderGroupA(SCARDCONTEXT, LPCSTR)
Definition: stubs.c:163
LONG WINAPI SCardGetAttrib(SCARDHANDLE, DWORD, LPBYTE, LPDWORD)
Definition: stubs.c:199
LPVOID pvUserData
Definition: winscard.h:50
LONG WINAPI SCardIsValidContext(SCARDCONTEXT)
Definition: winscard.c:93
LONG WINAPI SCardAddReaderToGroupA(SCARDCONTEXT, LPCSTR, LPCSTR)
Definition: winscard.c:61
LONG WINAPI SCardEstablishContext(DWORD, LPCVOID, LPCVOID, LPSCARDCONTEXT)
Definition: winscard.c:85
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
DWORD dwEventState
Definition: winscard.h:52
LONG WINAPI SCardIntroduceReaderW(SCARDCONTEXT, LPCWSTR, LPCWSTR)
Definition: stubs.c:346
ULONG_PTR * PSCARDHANDLE
Definition: winscard.h:38
LPCWSTR szReader
Definition: winscard.h:58
BYTE rgbAtr[36]
Definition: winscard.h:43
LONG WINAPI SCardForgetReaderGroupW(SCARDCONTEXT, LPCWSTR)
Definition: stubs.c:175
struct SCARD_READERSTATEA * PSCARD_READERSTATEA
LONG WINAPI SCardStatusA(SCARDHANDLE, LPSTR, LPDWORD, LPDWORD, LPDWORD, LPBYTE, LPDWORD)
Definition: winscard.c:114
DWORD dwEventState
Definition: winscard.h:61
ULONG_PTR SCARDCONTEXT
Definition: winscard.h:37
BYTE rgbMask[36]
Definition: winscard.h:44
LONG WINAPI SCardLocateCardsA(SCARDCONTEXT, LPCSTR, LPSCARD_READERSTATEA, DWORD)
Definition: stubs.c:453
LONG WINAPI SCardIntroduceReaderA(SCARDCONTEXT, LPCSTR, LPCSTR)
Definition: stubs.c:333
LONG WINAPI SCardSetCardTypeProviderNameA(SCARDCONTEXT, LPCSTR, DWORD, LPCSTR)
Definition: stubs.c:566
LONG WINAPI SCardLocateCardsW(SCARDCONTEXT, LPCWSTR, LPSCARD_READERSTATEW, DWORD)
Definition: stubs.c:467
char * LPSTR
Definition: xmlstorage.h:182
LONG WINAPI SCardAddReaderToGroupW(SCARDCONTEXT, LPCWSTR, LPCWSTR)
Definition: winscard.c:79
struct _SCARD_ATRMASK * LPSCARD_ATRMASK
LONG WINAPI SCardGetStatusChangeW(SCARDCONTEXT, DWORD, LPSCARD_READERSTATEW, DWORD)
Definition: stubs.c:283
LONG WINAPI SCardListReaderGroupsA(SCARDCONTEXT, LPSTR, LPDWORD)
Definition: stubs.c:427
uint32_t ULONG_PTR
Definition: typedefs.h:63
LONG WINAPI SCardLocateCardsByATRW(SCARDCONTEXT, LPSCARD_ATRMASK, DWORD, LPSCARD_READERSTATEW, DWORD)
Definition: stubs.c:496
ULONG_PTR * LPSCARDCONTEXT
Definition: winscard.h:37
LONG WINAPI SCardBeginTransaction(SCARDHANDLE)
Definition: stubs.c:20
LONG WINAPI SCardListReaderGroupsW(SCARDCONTEXT, LPWSTR, LPDWORD)
Definition: stubs.c:440
unsigned char * LPBYTE
Definition: typedefs.h:52
#define DECL_WINELIB_TYPE_AW(type)
Definition: windef.h:386
void WINAPI SCardReleaseStartedEvent(void)
Definition: winscard.c:128
long LONG
Definition: pedump.c:60
DWORD dwCurrentState
Definition: winscard.h:51
LONG WINAPI SCardListInterfacesW(SCARDCONTEXT, LPCWSTR, LPGUID, LPDWORD)
Definition: stubs.c:413
LONG WINAPI SCardListInterfacesA(SCARDCONTEXT, LPCSTR, LPGUID, LPDWORD)
Definition: stubs.c:399
LONG WINAPI SCardSetCardTypeProviderNameW(SCARDCONTEXT, LPCWSTR, DWORD, LPCWSTR)
Definition: stubs.c:580
LONG WINAPI SCardIntroduceReaderGroupA(SCARDCONTEXT, LPCSTR)
Definition: stubs.c:359
LONG WINAPI SCardDisconnect(SCARDHANDLE, DWORD)
Definition: stubs.c:91
LONG WINAPI SCardGetProviderIdW(SCARDCONTEXT, LPCWSTR, LPGUID)
Definition: stubs.c:256
ULONG_PTR * PSCARDCONTEXT
Definition: winscard.h:37
const char * LPCSTR
Definition: xmlstorage.h:183
LPVOID pvUserData
Definition: winscard.h:59
LONG WINAPI SCardStatusW(SCARDHANDLE, LPWSTR, LPDWORD, LPDWORD, LPDWORD, LPBYTE, LPDWORD)
Definition: winscard.c:121
LONG WINAPI SCardForgetCardTypeW(SCARDCONTEXT, LPCWSTR)
Definition: stubs.c:127
LONG WINAPI SCardForgetReaderA(SCARDCONTEXT, LPCSTR)
Definition: stubs.c:139
struct SCARD_READERSTATEW * PSCARD_READERSTATEW
LONG WINAPI SCardGetProviderIdA(SCARDCONTEXT, LPCSTR, LPGUID)
Definition: stubs.c:243
HANDLE WINAPI SCardAccessStartedEvent(void)
Definition: winscard.c:56
ULONG_PTR SCARDHANDLE
Definition: winscard.h:38
LONG WINAPI SCardGetCardTypeProviderNameA(SCARDCONTEXT, LPCSTR, DWORD, LPSTR, LPDWORD)
Definition: stubs.c:213
#define WINAPI
Definition: msvc.h:8
LONG WINAPI SCardIntroduceCardTypeW(SCARDCONTEXT, LPCWSTR, LPCGUID, LPCGUID, DWORD, LPCBYTE, LPCBYTE, DWORD)
Definition: stubs.c:315
unsigned long DWORD
Definition: ntddk_ex.h:95
LONG WINAPI SCardListCardsW(SCARDCONTEXT, LPCBYTE, LPCGUID, DWORD, LPWSTR, LPDWORD)
Definition: stubs.c:383
LONG WINAPI SCardListReadersW(SCARDCONTEXT, LPCWSTR, LPWSTR, LPDWORD)
struct _SCARD_ATRMASK SCARD_ATRMASK
LONG WINAPI SCardTransmit(SCARDHANDLE, LPCSCARD_IO_REQUEST, LPCBYTE, DWORD, LPSCARD_IO_REQUEST, LPBYTE, LPDWORD)
Definition: stubs.c:609
LONG WINAPI SCardConnectA(SCARDCONTEXT, LPCSTR, DWORD, DWORD, LPSCARDHANDLE, LPDWORD)
Definition: stubs.c:42
LONG WINAPI SCardCancel(SCARDCONTEXT)
Definition: stubs.c:31
LONG WINAPI SCardIntroduceCardTypeA(SCARDCONTEXT, LPCSTR, LPCGUID, LPCGUID, DWORD, LPCBYTE, LPCBYTE, DWORD)
Definition: stubs.c:297
ULONG_PTR * LPSCARDHANDLE
Definition: winscard.h:38
unsigned char BYTE
Definition: mem.h:68
struct _SCARD_ATRMASK * PSCARD_ATRMASK
LONG WINAPI SCardLocateCardsByATRA(SCARDCONTEXT, LPSCARD_ATRMASK, DWORD, LPSCARD_READERSTATEA, DWORD)
Definition: stubs.c:481
DWORD dwCurrentState
Definition: winscard.h:60
LONG WINAPI SCardState(SCARDHANDLE, LPDWORD, LPDWORD, LPBYTE, LPDWORD)
Definition: stubs.c:594
LONG WINAPI SCardReleaseContext(SCARDCONTEXT)
Definition: winscard.c:107
LONG WINAPI SCardFreeMemory(SCARDCONTEXT, LPCVOID)
Definition: stubs.c:187
CONST void * LPCVOID
Definition: windef.h:191
LONG WINAPI SCardReconnect(SCARDHANDLE, DWORD, DWORD, DWORD, LPDWORD)
Definition: stubs.c:511
uint32_t * LPDWORD
Definition: typedefs.h:57
const BYTE * LPCBYTE
Definition: winscard.h:34
LONG WINAPI SCardListReadersA(SCARDCONTEXT, LPCSTR, LPSTR, LPDWORD)
LONG WINAPI SCardSetAttrib(SCARDHANDLE, DWORD, LPCBYTE, DWORD)
Definition: stubs.c:552
DWORD cbAtr
Definition: winscard.h:42
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LONG WINAPI SCardControl(SCARDHANDLE, DWORD, LPCVOID, DWORD, LPVOID, DWORD, LPDWORD)
Definition: stubs.c:74
LONG WINAPI SCardRemoveReaderFromGroupW(SCARDCONTEXT, LPCWSTR, LPCWSTR)
Definition: stubs.c:539
LONG WINAPI SCardEndTransaction(SCARDHANDLE, DWORD)
Definition: stubs.c:103
LONG WINAPI SCardGetCardTypeProviderNameW(SCARDCONTEXT, LPCWSTR, DWORD, LPWSTR, LPDWORD)
Definition: stubs.c:228
LONG WINAPI SCardForgetCardTypeA(SCARDCONTEXT, LPCSTR)
Definition: stubs.c:115
LONG WINAPI SCardRemoveReaderFromGroupA(SCARDCONTEXT, LPCSTR, LPCSTR)
Definition: stubs.c:526
struct SCARD_READERSTATEW * LPSCARD_READERSTATEW
LONG WINAPI SCardForgetReaderW(SCARDCONTEXT, LPCWSTR)
Definition: stubs.c:151
struct SCARD_READERSTATEA * LPSCARD_READERSTATEA