globalplatform
winscard.h
Go to the documentation of this file.
1 /*
2  * MUSCLE SmartCard Development ( http://www.linuxnet.com )
3  *
4  * Copyright (C) 1999-2003
5  * David Corcoran <corcoran@linuxnet.com>
6  * Ludovic Rousseau <ludovic.rousseau@free.fr>
7  *
8  * $Id: winscard.h,v 1.1 2007-08-22 22:59:14 k_o_ Exp $
9  */
10 
16 #ifndef __winscard_h__
17 #define __winscard_h__
18 
19 #include <pcsclite.h>
20 
21 #ifdef __cplusplus
22 extern "C"
23 {
24 #endif
25 
26 #ifndef PCSC_API
27 #define PCSC_API
28 #endif
29 
30  PCSC_API LONG SCardEstablishContext(DWORD dwScope,
31  LPCVOID pvReserved1, LPCVOID pvReserved2, LPSCARDCONTEXT phContext);
32 
33  PCSC_API LONG SCardReleaseContext(SCARDCONTEXT hContext);
34 
35  PCSC_API LONG SCardSetTimeout(SCARDCONTEXT hContext, DWORD dwTimeout);
36 
37  PCSC_API LONG SCardConnect(SCARDCONTEXT hContext,
38  LPCSTR szReader,
39  DWORD dwShareMode,
40  DWORD dwPreferredProtocols,
41  LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol);
42 
43  PCSC_API LONG SCardReconnect(SCARDHANDLE hCard,
44  DWORD dwShareMode,
45  DWORD dwPreferredProtocols,
46  DWORD dwInitialization, LPDWORD pdwActiveProtocol);
47 
48  PCSC_API LONG SCardDisconnect(SCARDHANDLE hCard, DWORD dwDisposition);
49 
50  PCSC_API LONG SCardBeginTransaction(SCARDHANDLE hCard);
51 
52  PCSC_API LONG SCardEndTransaction(SCARDHANDLE hCard, DWORD dwDisposition);
53 
54  PCSC_API LONG SCardCancelTransaction(SCARDHANDLE hCard);
55 
56  PCSC_API LONG SCardStatus(SCARDHANDLE hCard,
57  LPSTR mszReaderNames, LPDWORD pcchReaderLen,
58  LPDWORD pdwState,
59  LPDWORD pdwProtocol,
60  LPBYTE pbAtr, LPDWORD pcbAtrLen);
61 
62  PCSC_API LONG SCardGetStatusChange(SCARDCONTEXT hContext,
63  DWORD dwTimeout,
64  LPSCARD_READERSTATE_A rgReaderStates, DWORD cReaders);
65 
66  PCSC_API LONG SCardControl(SCARDHANDLE hCard, DWORD dwControlCode,
67  LPCVOID pbSendBuffer, DWORD cbSendLength,
68  LPVOID pbRecvBuffer, DWORD cbRecvLength, LPDWORD lpBytesReturned);
69 
70  PCSC_API LONG SCardTransmit(SCARDHANDLE hCard,
71  LPCSCARD_IO_REQUEST pioSendPci,
72  LPCBYTE pbSendBuffer, DWORD cbSendLength,
73  LPSCARD_IO_REQUEST pioRecvPci,
74  LPBYTE pbRecvBuffer, LPDWORD pcbRecvLength);
75 
76  PCSC_API LONG SCardListReaderGroups(SCARDCONTEXT hContext,
77  LPSTR mszGroups, LPDWORD pcchGroups);
78 
79  PCSC_API LONG SCardListReaders(SCARDCONTEXT hContext,
80  LPCSTR mszGroups,
81  LPSTR mszReaders, LPDWORD pcchReaders);
82 
83  PCSC_API LONG SCardCancel(SCARDCONTEXT hContext);
84 
85  PCSC_API LONG SCardGetAttrib(SCARDHANDLE hCard, DWORD dwAttrId,
86  LPBYTE pbAttr, LPDWORD pcbAttrLen);
87 
88  PCSC_API LONG SCardSetAttrib(SCARDHANDLE hCard, DWORD dwAttrId,
89  LPCBYTE pbAttr, DWORD cbAttrLen);
90 
91  void SCardUnload(void);
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 #endif
98 
_SCARD_IO_REQUEST
Definition: pcsclite.h:52
LONG
long LONG
A long value.
Definition: types.h:53
DWORD
unsigned long DWORD
A Microsoft/Muscle DWORD definition.
Definition: types.h:52
SCARD_READERSTATE_A
Definition: pcsclite.h:38
pcsclite.h
This keeps a list of defines for pcsc-lite.