advapi32: Implement EnumServicesStatusExA/W.
[wine] / include / winscard.h
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 #ifndef _LPCBYTE_DEFINED
28 #define _LPCBYTE_DEFINED
29 typedef const BYTE *LPCBYTE;
30 #endif
31
32 typedef ULONG_PTR SCARDCONTEXT, *PSCARDCONTEXT, *LPSCARDCONTEXT;
33 typedef ULONG_PTR SCARDHANDLE,  *PSCARDHANDLE,  *LPSCARDHANDLE;
34
35 typedef struct _SCARD_ATRMASK
36 {
37     DWORD cbAtr;
38     BYTE  rgbAtr[36];
39     BYTE  rgbMask[36];
40 } SCARD_ATRMASK, *PSCARD_ATRMASK, *LPSCARD_ATRMASK;
41
42 typedef struct
43 {
44     LPCSTR szReader;
45     LPVOID pvUserData;
46     DWORD  dwCurrentState;
47     DWORD  dwEventState;
48     DWORD  cbAtr;
49     BYTE   rgbAtr[36];
50 } SCARD_READERSTATEA, *PSCARD_READERSTATEA, *LPSCARD_READERSTATEA;
51 typedef struct
52 {
53     LPCWSTR szReader;
54     LPVOID  pvUserData;
55     DWORD   dwCurrentState;
56     DWORD   dwEventState;
57     DWORD   cbAtr;
58     BYTE    rgbAtr[36];
59 } SCARD_READERSTATEW, *PSCARD_READERSTATEW, *LPSCARD_READERSTATEW;
60 DECL_WINELIB_TYPE_AW(SCARD_READERSTATE)
61 DECL_WINELIB_TYPE_AW(PSCARD_READERSTATE)
62 DECL_WINELIB_TYPE_AW(LPSCARD_READERSTATE)
63
64
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
68
69 HANDLE      WINAPI SCardAccessStartedEvent(void);
70 LONG        WINAPI SCardAddReaderToGroupA(SCARDCONTEXT,LPCSTR,LPCSTR);
71 LONG        WINAPI SCardAddReaderToGroupW(SCARDCONTEXT,LPCWSTR,LPCWSTR);
72 #define     SCardAddReaderToGroup WINELIB_NAME_AW(SCardAddReaderToGroup)
73 LONG        WINAPI SCardBeginTransaction(SCARDHANDLE);
74 LONG        WINAPI SCardCancel(SCARDCONTEXT);
75 LONG        WINAPI SCardConnectA(SCARDCONTEXT,LPCSTR,DWORD,DWORD,LPSCARDHANDLE,LPDWORD);
76 LONG        WINAPI SCardConnectW(SCARDCONTEXT,LPCWSTR,DWORD,DWORD,LPSCARDHANDLE,LPDWORD);
77 #define     SCardConnect WINELIB_NAME_AW(SCardConnect)
78 LONG        WINAPI SCardControl(SCARDHANDLE,DWORD,LPCVOID,DWORD,LPVOID,DWORD,LPDWORD);
79 LONG        WINAPI SCardDisconnect(SCARDHANDLE,DWORD);
80 LONG        WINAPI SCardEndTransaction(SCARDHANDLE,DWORD);
81 LONG        WINAPI SCardEstablishContext(DWORD,LPCVOID,LPCVOID,LPSCARDCONTEXT);
82 LONG        WINAPI SCardForgetCardTypeA(SCARDCONTEXT,LPCSTR);
83 LONG        WINAPI SCardForgetCardTypeW(SCARDCONTEXT,LPCWSTR);
84 #define     SCardForgetCardType WINELIB_NAME_AW(SCardForgetCardType)
85 LONG        WINAPI SCardForgetReaderA(SCARDCONTEXT,LPCSTR);
86 LONG        WINAPI SCardForgetReaderW(SCARDCONTEXT,LPCWSTR);
87 #define     SCardForgetReader WINELIB_NAME_AW(SCardForgetReader)
88 LONG        WINAPI SCardForgetReaderGroupA(SCARDCONTEXT,LPCSTR);
89 LONG        WINAPI SCardForgetReaderGroupW(SCARDCONTEXT,LPCWSTR);
90 #define     SCardForgetReaderGroup WINELIB_NAME_AW(SCardForgetReaderGroup)
91 LONG        WINAPI SCardFreeMemory(SCARDCONTEXT,LPCVOID);
92 LONG        WINAPI SCardGetAttrib(SCARDHANDLE,DWORD,LPBYTE,LPDWORD);
93 LONG        WINAPI SCardGetCardTypeProviderNameA(SCARDCONTEXT,LPCSTR,DWORD,LPSTR,LPDWORD);
94 LONG        WINAPI SCardGetCardTypeProviderNameW(SCARDCONTEXT,LPCWSTR,DWORD,LPWSTR,LPDWORD);
95 #define     SCardGetCardTypeProviderName WINELIB_NAME_AW(SCardGetCardTypeProviderName)
96 LONG        WINAPI SCardGetProviderIdA(SCARDCONTEXT,LPCSTR,LPGUID);
97 LONG        WINAPI SCardGetProviderIdW(SCARDCONTEXT,LPCWSTR,LPGUID);
98 #define     SCardGetProviderId WINELIB_NAME_AW(SCardGetProviderId)
99 LONG        WINAPI SCardGetStatusChangeA(SCARDCONTEXT,DWORD,LPSCARD_READERSTATEA,DWORD);
100 LONG        WINAPI SCardGetStatusChangeW(SCARDCONTEXT,DWORD,LPSCARD_READERSTATEW,DWORD);
101 #define     SCardGetStatusChange WINELIB_NAME_AW(SCardGetStatusChange)
102 LONG        WINAPI SCardIntroduceCardTypeA(SCARDCONTEXT,LPCSTR,LPCGUID,LPCGUID,DWORD,LPCBYTE,LPCBYTE,DWORD);
103 LONG        WINAPI SCardIntroduceCardTypeW(SCARDCONTEXT,LPCWSTR,LPCGUID,LPCGUID,DWORD,LPCBYTE,LPCBYTE,DWORD);
104 #define     SCardIntroduceCardType WINELIB_NAME_AW(SCardIntroduceCardType)
105 LONG        WINAPI SCardIntroduceReaderA(SCARDCONTEXT,LPCSTR,LPCSTR);
106 LONG        WINAPI SCardIntroduceReaderW(SCARDCONTEXT,LPCWSTR,LPCWSTR);
107 #define     SCardIntroduceReader WINELIB_NAME_AW(SCardIntroduceReader)
108 LONG        WINAPI SCardIntroduceReaderGroupA(SCARDCONTEXT,LPCSTR);
109 LONG        WINAPI SCardIntroduceReaderGroupW(SCARDCONTEXT,LPCWSTR);
110 #define     SCardIntroduceReaderGroup WINELIB_NAME_AW(SCardIntroduceReaderGroup)
111 LONG        WINAPI SCardIsValidContext(SCARDCONTEXT);
112 LONG        WINAPI SCardListCardsA(SCARDCONTEXT,LPCBYTE,LPCGUID,DWORD,LPSTR,LPDWORD);
113 LONG        WINAPI SCardListCardsW(SCARDCONTEXT,LPCBYTE,LPCGUID,DWORD,LPWSTR,LPDWORD);
114 #define     SCardListCards WINELIB_NAME_AW(SCardListCards)
115 LONG        WINAPI SCardListInterfacesA(SCARDCONTEXT,LPCSTR,LPGUID,LPDWORD);
116 LONG        WINAPI SCardListInterfacesW(SCARDCONTEXT,LPCWSTR,LPGUID,LPDWORD);
117 #define     SCardListInterfaces WINELIB_NAME_AW(SCardListInterfaces)
118 LONG        WINAPI SCardListReadersA(SCARDCONTEXT,LPCSTR,LPSTR,LPDWORD);
119 LONG        WINAPI SCardListReadersW(SCARDCONTEXT,LPCWSTR,LPWSTR,LPDWORD);
120 #define     SCardListReaders WINELIB_NAME_AW(SCardListReaders)
121 LONG        WINAPI SCardListReaderGroupsA(SCARDCONTEXT,LPSTR,LPDWORD);
122 LONG        WINAPI SCardListReaderGroupsW(SCARDCONTEXT,LPWSTR,LPDWORD);
123 #define     SCardListReaderGroups WINELIB_NAME_AW(SCardListReaderGroups)
124 LONG        WINAPI SCardLocateCardsA(SCARDCONTEXT,LPCSTR,LPSCARD_READERSTATEA,DWORD);
125 LONG        WINAPI SCardLocateCardsW(SCARDCONTEXT,LPCWSTR,LPSCARD_READERSTATEW,DWORD);
126 #define     SCardLocateCards WINELIB_NAME_AW(SCardLocateCards)
127 LONG        WINAPI SCardLocateCardsByATRA(SCARDCONTEXT,LPSCARD_ATRMASK,DWORD,LPSCARD_READERSTATEA,DWORD);
128 LONG        WINAPI SCardLocateCardsByATRW(SCARDCONTEXT,LPSCARD_ATRMASK,DWORD,LPSCARD_READERSTATEW,DWORD);
129 #define     SCardLocateCardsByATR WINELIB_NAME_AW(SCardLocateCardsByATR)
130 LONG        WINAPI SCardReconnect(SCARDHANDLE,DWORD,DWORD,DWORD,LPDWORD);
131 LONG        WINAPI SCardReleaseContext(SCARDCONTEXT);
132 void        WINAPI SCardReleaseStartedEvent(void);
133 LONG        WINAPI SCardRemoveReaderFromGroupA(SCARDCONTEXT,LPCSTR,LPCSTR);
134 LONG        WINAPI SCardRemoveReaderFromGroupW(SCARDCONTEXT,LPCWSTR,LPCWSTR);
135 #define     SCardRemoveReaderFromGroup WINELIB_NAME_AW(SCardRemoveReaderFromGroup)
136 LONG        WINAPI SCardSetAttrib(SCARDHANDLE,DWORD,LPCBYTE,DWORD);
137 LONG        WINAPI SCardSetCardTypeProviderNameA(SCARDCONTEXT,LPCSTR,DWORD,LPCSTR);
138 LONG        WINAPI SCardSetCardTypeProviderNameW(SCARDCONTEXT,LPCWSTR,DWORD,LPCWSTR);
139 #define     SCardSetCardTypeProviderName WINELIB_NAME_AW(SCardSetCardTypeProviderName)
140 LONG        WINAPI SCardState(SCARDHANDLE,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
141 LONG        WINAPI SCardStatusA(SCARDHANDLE,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
142 LONG        WINAPI SCardStatusW(SCARDHANDLE,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
143 #define     SCardStatus WINELIB_NAME_AW(SCardStatus)
144 LONG        WINAPI SCardTransmit(SCARDHANDLE,LPCSCARD_IO_REQUEST,LPCBYTE,DWORD,LPSCARD_IO_REQUEST,LPBYTE,LPDWORD);
145
146 #ifdef __cplusplus
147 }
148 #endif
149
150 #endif  /* __WINE_WINSCARD_H */