pcsc-lite 2.3.0
libfake.c
Go to the documentation of this file.
1/*
2 * MUSCLE SmartCard Development ( https://pcsclite.apdu.fr/ )
3 *
4 * Copyright (C) 2024
5 * Ludovic Rousseau <ludovic.rousseau@free.fr>
6 *
7Redistribution and use in source and binary forms, with or without
8modification, are permitted provided that the following conditions
9are met:
10
111. Redistributions of source code must retain the above copyright
12 notice, this list of conditions and the following disclaimer.
132. Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
163. The name of the author may not be used to endorse or promote products
17 derived from this software without specific prior written permission.
18
19THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
36/* define PCSC_API used in winscard.h */
37#include "misc.h"
38#include "winscard.h"
39
40LONG SCardEstablishContext(DWORD dwScope,
41 LPCVOID pvReserved1, LPCVOID pvReserved2,
42 LPSCARDCONTEXT phContext)
43{
44 (void)dwScope;
45 (void)pvReserved1;
46 (void)pvReserved2;
47 (void)phContext;
48
50}
51
52LONG SCardReleaseContext(SCARDCONTEXT hContext)
53{
54 (void)hContext;
55
57}
58
59LONG SCardIsValidContext(SCARDCONTEXT hContext)
60{
61 (void)hContext;
62
64}
65
66LONG SCardConnect(SCARDCONTEXT hContext,
67 LPCSTR szReader,
68 DWORD dwShareMode,
69 DWORD dwPreferredProtocols,
70 LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol)
71{
72 (void)hContext;
73 (void)szReader;
74 (void)dwShareMode;
75 (void)dwPreferredProtocols;
76 (void)phCard;
77 (void)pdwActiveProtocol;
78
80}
81
82LONG SCardReconnect(SCARDHANDLE hCard,
83 DWORD dwShareMode,
84 DWORD dwPreferredProtocols,
85 DWORD dwInitialization, LPDWORD pdwActiveProtocol)
86{
87 (void)hCard;
88 (void)dwShareMode;
89 (void)dwPreferredProtocols;
90 (void)dwInitialization;
91 (void)pdwActiveProtocol;
92
94}
95
96LONG SCardDisconnect(SCARDHANDLE hCard, DWORD dwDisposition)
97{
98 (void)hCard;
99 (void)dwDisposition;
100
102}
103
104LONG SCardBeginTransaction(SCARDHANDLE hCard)
105{
106 (void)hCard;
107
109}
110
111LONG SCardEndTransaction(SCARDHANDLE hCard, DWORD dwDisposition)
112{
113 (void)hCard;
114 (void)dwDisposition;
115
117}
118
119LONG SCardStatus(SCARDHANDLE hCard,
120 LPSTR mszReaderName,
121 LPDWORD pcchReaderLen,
122 LPDWORD pdwState,
123 LPDWORD pdwProtocol,
124 LPBYTE pbAtr,
125 LPDWORD pcbAtrLen)
126{
127 (void)hCard;
128 (void)mszReaderName;
129 (void)pcchReaderLen;
130 (void)pdwState;
131 (void)pdwProtocol;
132 (void)pbAtr;
133 (void)pcbAtrLen;
134
136}
137
138LONG SCardGetStatusChange(SCARDCONTEXT hContext,
139 DWORD dwTimeout,
140 SCARD_READERSTATE *rgReaderStates, DWORD cReaders)
141{
142 (void)hContext;
143 (void)dwTimeout;
144 (void)rgReaderStates;
145 (void)cReaders;
146
148}
149
150LONG SCardControl(SCARDHANDLE hCard, DWORD dwControlCode,
151 LPCVOID pbSendBuffer, DWORD cbSendLength,
152 LPVOID pbRecvBuffer, DWORD cbRecvLength,
153 LPDWORD lpBytesReturned)
154{
155 (void)hCard;
156 (void)dwControlCode;
157 (void)pbSendBuffer;
158 (void)cbSendLength;
159 (void)pbRecvBuffer;
160 (void)cbRecvLength;
161 (void)lpBytesReturned;
162
164}
165
166LONG SCardTransmit(SCARDHANDLE hCard,
167 const SCARD_IO_REQUEST *pioSendPci,
168 LPCBYTE pbSendBuffer, DWORD cbSendLength,
169 SCARD_IO_REQUEST *pioRecvPci,
170 LPBYTE pbRecvBuffer, LPDWORD pcbRecvLength)
171{
172 (void)hCard;
173 (void)pioSendPci;
174 (void)pbSendBuffer;
175 (void)cbSendLength;
176 (void)pioRecvPci;
177 (void)pbRecvBuffer;
178 (void)pcbRecvLength;
179
181}
182
183LONG SCardListReaderGroups(SCARDCONTEXT hContext,
184 LPSTR mszGroups, LPDWORD pcchGroups)
185{
186 (void)hContext;
187 (void)mszGroups;
188 (void)pcchGroups;
189
191}
192
193LONG SCardListReaders(SCARDCONTEXT hContext,
194 LPCSTR mszGroups,
195 LPSTR mszReaders,
196 LPDWORD pcchReaders)
197{
198 (void)hContext;
199 (void)mszGroups;
200 (void)mszReaders;
201 (void)pcchReaders;
202
204}
205
206LONG SCardFreeMemory(SCARDCONTEXT hContext, LPCVOID pvMem)
207{
208 (void)hContext;
209 (void)pvMem;
210
212}
213
214LONG SCardCancel(SCARDCONTEXT hContext)
215{
216 (void)hContext;
217
219}
220
221LONG SCardGetAttrib(SCARDHANDLE hCard, DWORD dwAttrId,
222LPBYTE pbAttr, LPDWORD pcbAttrLen)
223{
224 (void)hCard;
225 (void)dwAttrId;
226 (void)pbAttr;
227 (void)pcbAttrLen;
228
230}
231
232LONG SCardSetAttrib(SCARDHANDLE hCard, DWORD dwAttrId,
233 LPCBYTE pbAttr, DWORD cbAttrLen)
234{
235 (void)hCard;
236 (void)dwAttrId;
237 (void)pbAttr;
238 (void)cbAttrLen;
239
241}
#define SCARD_F_INTERNAL_ERROR
An internal consistency check failed.
Definition pcsclite.h:109
LONG SCARDCONTEXT
hContext returned by SCardEstablishContext()
Definition pcsclite.h:52
LONG SCARDHANDLE
hCard returned by SCardConnect()
Definition pcsclite.h:55
Protocol Control Information (PCI)
Definition pcsclite.h:80
This handles smart card reader communications.