16 #ifndef __winscard_h__
17 #define __winscard_h__
30 PCSC_API
LONG SCardEstablishContext(
DWORD dwScope,
31 LPCVOID pvReserved1, LPCVOID pvReserved2, LPSCARDCONTEXT phContext);
33 PCSC_API
LONG SCardReleaseContext(SCARDCONTEXT hContext);
35 PCSC_API
LONG SCardSetTimeout(SCARDCONTEXT hContext,
DWORD dwTimeout);
37 PCSC_API
LONG SCardConnect(SCARDCONTEXT hContext,
40 DWORD dwPreferredProtocols,
41 LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol);
43 PCSC_API
LONG SCardReconnect(SCARDHANDLE hCard,
45 DWORD dwPreferredProtocols,
46 DWORD dwInitialization, LPDWORD pdwActiveProtocol);
48 PCSC_API
LONG SCardDisconnect(SCARDHANDLE hCard,
DWORD dwDisposition);
50 PCSC_API
LONG SCardBeginTransaction(SCARDHANDLE hCard);
52 PCSC_API
LONG SCardEndTransaction(SCARDHANDLE hCard,
DWORD dwDisposition);
54 PCSC_API
LONG SCardCancelTransaction(SCARDHANDLE hCard);
56 PCSC_API
LONG SCardStatus(SCARDHANDLE hCard,
57 LPSTR mszReaderNames, LPDWORD pcchReaderLen,
60 LPBYTE pbAtr, LPDWORD pcbAtrLen);
62 PCSC_API
LONG SCardGetStatusChange(SCARDCONTEXT hContext,
66 PCSC_API
LONG SCardControl(SCARDHANDLE hCard,
DWORD dwControlCode,
67 LPCVOID pbSendBuffer,
DWORD cbSendLength,
68 LPVOID pbRecvBuffer,
DWORD cbRecvLength, LPDWORD lpBytesReturned);
70 PCSC_API
LONG SCardTransmit(SCARDHANDLE hCard,
71 LPCSCARD_IO_REQUEST pioSendPci,
72 LPCBYTE pbSendBuffer,
DWORD cbSendLength,
74 LPBYTE pbRecvBuffer, LPDWORD pcbRecvLength);
76 PCSC_API
LONG SCardListReaderGroups(SCARDCONTEXT hContext,
77 LPSTR mszGroups, LPDWORD pcchGroups);
79 PCSC_API
LONG SCardListReaders(SCARDCONTEXT hContext,
81 LPSTR mszReaders, LPDWORD pcchReaders);
83 PCSC_API
LONG SCardCancel(SCARDCONTEXT hContext);
85 PCSC_API
LONG SCardGetAttrib(SCARDHANDLE hCard,
DWORD dwAttrId,
86 LPBYTE pbAttr, LPDWORD pcbAttrLen);
88 PCSC_API
LONG SCardSetAttrib(SCARDHANDLE hCard,
DWORD dwAttrId,
89 LPCBYTE pbAttr,
DWORD cbAttrLen);
91 void SCardUnload(
void);