8 added files
reactos/include
diff -N WinSCard.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ WinSCard.h 7 Nov 2004 15:37:40 -0000 1.1
@@ -0,0 +1,256 @@
+/*
+ * WinSCard.h
+ *
+ * SmartCard API
+ *
+ * THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ * This source code is offered for use in the public domain. You may
+ * use, modify or distribute it freely.
+ *
+ * This code is distributed in the hope that it will be useful but
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ * DISCLAIMED. This includes but is not limited to warranties of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+#ifndef __WINSCARD_H
+#define __WINSCARD_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#include <WinSmCrd.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define SCARD_S_SUCCESS NO_ERROR
+
+#define SCARD_F_INTERNAL_ERROR ((DWORD)0x80100001)
+#define SCARD_E_CANCELLED ((DWORD)0x80100002)
+#define SCARD_E_INVALID_HANDLE ((DWORD)0x80100003)
+#define SCARD_E_INVALID_PARAMETER ((DWORD)0x80100004)
+#define SCARD_E_INVALID_TARGET ((DWORD)0x80100005)
+#define SCARD_E_NO_MEMORY ((DWORD)0x80100006)
+#define SCARD_F_WAITED_TOO_LONG ((DWORD)0x80100007)
+#define SCARD_E_INSUFFICIENT_BUFFER ((DWORD)0x80100008)
+#define SCARD_E_UNKNOWN_READER ((DWORD)0x80100009)
+#define SCARD_E_TIMEOUT ((DWORD)0x8010000A)
+#define SCARD_E_SHARING_VIOLATION ((DWORD)0x8010000B)
+#define SCARD_E_NO_SMARTCARD ((DWORD)0x8010000C)
+#define SCARD_E_UNKNOWN_CARD ((DWORD)0x8010000D)
+#define SCARD_E_CANT_DISPOSE ((DWORD)0x8010000E)
+#define SCARD_E_PROTO_MISMATCH ((DWORD)0x8010000F)
+#define SCARD_E_NOT_READY ((DWORD)0x80100010)
+#define SCARD_E_INVALID_VALUE ((DWORD)0x80100011)
+#define SCARD_E_SYSTEM_CANCELLED ((DWORD)0x80100012)
+#define SCARD_F_COMM_ERROR ((DWORD)0x80100013)
+#define SCARD_F_UNKNOWN_ERROR ((DWORD)0x80100014)
+#define SCARD_E_INVALID_ATR ((DWORD)0x80100015)
+#define SCARD_E_NOT_TRANSACTED ((DWORD)0x80100016)
+#define SCARD_E_READER_UNAVAILABLE ((DWORD)0x80100017)
+#define SCARD_P_SHUTDOWN ((DWORD)0x80100018)
+#define SCARD_E_PCI_TOO_SMALL ((DWORD)0x80100019)
+#define SCARD_E_READER_UNSUPPORTED ((DWORD)0x8010001A)
+#define SCARD_E_DUPLICATE_READER ((DWORD)0x8010001B)
+#define SCARD_E_CARD_UNSUPPORTED ((DWORD)0x8010001C)
+#define SCARD_E_NO_SERVICE ((DWORD)0x8010001D)
+#define SCARD_E_SERVICE_STOPPED ((DWORD)0x8010001E)
+#define SCARD_E_UNEXPECTED ((DWORD)0x8010001F)
+#define SCARD_E_ICC_INSTALLATION ((DWORD)0x80100020)
+#define SCARD_E_ICC_CREATEORDER ((DWORD)0x80100021)
+#define SCARD_E_UNSUPPORTED_FEATURE ((DWORD)0x80100022)
+#define SCARD_E_DIR_NOT_FOUND ((DWORD)0x80100023)
+#define SCARD_E_FILE_NOT_FOUND ((DWORD)0x80100024)
+#define SCARD_E_NO_DIR ((DWORD)0x80100025)
+#define SCARD_E_NO_FILE ((DWORD)0x80100026)
+#define SCARD_E_NO_ACCESS ((DWORD)0x80100027)
+#define SCARD_E_WRITE_TOO_MANY ((DWORD)0x80100028)
+#define SCARD_E_BAD_SEEK ((DWORD)0x80100029)
+#define SCARD_E_INVALID_CHV ((DWORD)0x8010002A)
+#define SCARD_E_UNKNOWN_RES_MNG ((DWORD)0x8010002B)
+#define SCARD_E_NO_SUCH_CERTIFICATE ((DWORD)0x8010002C)
+#define SCARD_E_CERTIFICATE_UNAVAILABLE ((DWORD)0x8010002D)
+#define SCARD_E_NO_READERS_AVAILABLE ((DWORD)0x8010002E)
+#define SCARD_E_COMM_DATA_LOST ((DWORD)0x8010002F)
+#define SCARD_E_NO_KEY_CONTAINER ((DWORD)0x80100030)
+#define SCARD_W_UNSUPPORTED_CARD ((DWORD)0x80100065)
+#define SCARD_W_UNRESPONSIVE_CARD ((DWORD)0x80100066)
+#define SCARD_W_UNPOWERED_CARD ((DWORD)0x80100067)
+#define SCARD_W_RESET_CARD ((DWORD)0x80100068)
+#define SCARD_W_REMOVED_CARD ((DWORD)0x80100069)
+#define SCARD_W_SECURITY_VIOLATION ((DWORD)0x8010006A)
+#define SCARD_W_WRONG_CHV ((DWORD)0x8010006B)
+#define SCARD_W_CHV_BLOCKED ((DWORD)0x8010006C)
+#define SCARD_W_EOF ((DWORD)0x8010006D)
+#define SCARD_W_CANCELLED_BY_USER ((DWORD)0x8010006E)
+#define SCARD_W_CARD_NOT_AUTHENTICATED ((DWORD)0x8010006F)
+
+#define SCARD_SHARE_EXCLUSIVE (0x1)
+#define SCARD_SHARE_SHARED (0x2)
+#define SCARD_SHARE_DIRECT (0x3)
+
+#define SCARD_LEAVE_CARD (0x0)
+#define SCARD_RESET_CARD (0x1)
+#define SCARD_UNPOWER_CARD (0x2)
+#define SCARD_EJECT_CARD (0x3)
+
+#define SCARD_AUTOALLOCATE ((DWORD)-1)
+#define SCARD_SCOPE_USER (0x0)
+#define SCARD_SCOPE_TERMINAL (0x1)
+#define SCARD_SCOPE_SYSTEM (0x2)
+
+#define SCARD_PROVIDER_PRIMARY (0x1)
+#define SCARD_PROVIDER_CSP (0x2)
+
+typedef ULONG_PTR SCARDCONTEXT, *PSCARDCONTEXT, *LPSCARDCONTEXT;
+typedef ULONG_PTR SCARDHANDLE, *PSCARDHANDLE, *LPSCARDHANDLE;
+typedef const BYTE *LPCBYTE;
+
+typedef struct _SCARD_READERSTATEA
+{
+ LPCSTR szReader;
+ LPVOID pvUserData;
+ DWORD dwCurrentState;
+ DWORD dwEventState;
+ DWORD cbAtr;
+ BYTE rgbAtr[36];
+} SCARD_READERSTATEA, *PSCARD_READERSTATEA, *LPSCARD_READERSTATEA;
+
+typedef struct _SCARD_READERSTATEW
+{
+ LPCWSTR szReader;
+ LPVOID pvUserData;
+ DWORD dwCurrentState;
+ DWORD dwEventState;
+ DWORD cbAtr;
+ BYTE rgbAtr[36];
+} SCARD_READERSTATEW, *PSCARD_READERSTATEW, *LPSCARD_READERSTATEW;
+
+typedef struct _SCARD_ATRMASK
+{
+ DWORD cbAtr;
+ BYTE rgbAtr[36];
+ BYTE rgbMask[36];
+} SCARD_ATRMASK, *PSCARD_ATRMASK, *LPSCARD_ATRMASK;
+
+HANDLE STDCALL SCardAccessStartedEvent(VOID);
+LONG STDCALL SCardAddReaderToGroupA(SCARDCONTEXT, LPCSTR, LPCSTR);
+LONG STDCALL SCardAddReaderToGroupW(SCARDCONTEXT, LPCWSTR, LPCWSTR);
+LONG STDCALL SCardBeginTransaction(SCARDHANDLE);
+LONG STDCALL SCardCancel(SCARDCONTEXT);
+LONG STDCALL SCardConnectA(SCARDCONTEXT, LPCSTR, DWORD, DWORD, LPSCARDHANDLE, LPDWORD);
+LONG STDCALL SCardConnectW(SCARDCONTEXT, LPCWSTR, DWORD, DWORD, LPSCARDHANDLE, LPDWORD);
+LONG STDCALL SCardControl(SCARDHANDLE, DWORD, LPCVOID, DWORD, LPVOID, DWORD, LPDWORD);
+LONG STDCALL SCardDisconnect(SCARDHANDLE, DWORD);
+LONG STDCALL SCardEndTransaction(SCARDHANDLE, DWORD);
+LONG STDCALL SCardEstablishContext(DWORD, LPCVOID, LPCVOID, LPSCARDCONTEXT);
+LONG STDCALL SCardForgetCardTypeA(SCARDCONTEXT, LPCSTR);
+LONG STDCALL SCardForgetCardTypeW(SCARDCONTEXT, LPCWSTR);
+LONG STDCALL SCardForgetReaderA(SCARDCONTEXT, LPCSTR);
+LONG STDCALL SCardForgetReaderW(SCARDCONTEXT, LPCWSTR);
+LONG STDCALL SCardForgetReaderGroupA(SCARDCONTEXT, LPCSTR);
+LONG STDCALL SCardForgetReaderGroupW(SCARDCONTEXT, LPCWSTR);
+LONG STDCALL SCardFreeMemory(SCARDCONTEXT, LPCVOID);
+LONG STDCALL SCardGetAttrib(SCARDHANDLE, DWORD, LPBYTE, LPDWORD);
+LONG STDCALL SCardGetCardTypeProviderNameA(SCARDCONTEXT, LPCSTR, DWORD, LPSTR, LPDWORD);
+LONG STDCALL SCardGetCardTypeProviderNameW(SCARDCONTEXT, LPCWSTR, DWORD, LPWSTR, LPDWORD);
+LONG STDCALL SCardGetProviderIdA(SCARDCONTEXT, LPCSTR, LPGUID);
+LONG STDCALL SCardGetProviderIdW(SCARDCONTEXT, LPCWSTR, LPGUID);
+LONG STDCALL SCardGetStatusChangeA(SCARDCONTEXT, DWORD, LPSCARD_READERSTATEA, DWORD);
+LONG STDCALL SCardGetStatusChangeW(SCARDCONTEXT, DWORD, LPSCARD_READERSTATEW, DWORD);
+LONG STDCALL SCardIntroduceCardTypeA(SCARDCONTEXT, LPCSTR, LPCGUID, LPCGUID, DWORD, LPCBYTE, LPCBYTE, DWORD);
+LONG STDCALL SCardIntroduceCardTypeW(SCARDCONTEXT, LPCWSTR, LPCGUID, LPCGUID, DWORD, LPCBYTE, LPCBYTE, DWORD);
+LONG STDCALL SCardIntroduceReaderA(SCARDCONTEXT, LPCSTR, LPCSTR);
+LONG STDCALL SCardIntroduceReaderW(SCARDCONTEXT, LPCWSTR, LPCWSTR);
+LONG STDCALL SCardIntroduceReaderGroupA(SCARDCONTEXT, LPCSTR);
+LONG STDCALL SCardIntroduceReaderGroupW(SCARDCONTEXT, LPCWSTR);
+LONG STDCALL SCardIsValidContext(SCARDCONTEXT);
+LONG STDCALL SCardListCardsA(SCARDCONTEXT, LPCBYTE, LPCGUID, DWORD, LPCSTR, LPDWORD);
+LONG STDCALL SCardListCardsW(SCARDCONTEXT, LPCBYTE, LPCGUID, DWORD, LPCWSTR, LPDWORD);
+LONG STDCALL SCardListInterfacesA(SCARDCONTEXT, LPCSTR, LPGUID, LPDWORD);
+LONG STDCALL SCardListInterfacesW(SCARDCONTEXT, LPCWSTR, LPGUID, LPDWORD);
+LONG STDCALL SCardListReaderGroupsA(SCARDCONTEXT, LPSTR, LPDWORD);
+LONG STDCALL SCardListReaderGroupsW(SCARDCONTEXT, LPWSTR, LPDWORD);
+LONG STDCALL SCardListReadersA(SCARDCONTEXT, LPCSTR, LPSTR, LPDWORD);
+LONG STDCALL SCardListReadersW(SCARDCONTEXT, LPCWSTR, LPWSTR, LPDWORD);
+LONG STDCALL SCardLocateCardsA(SCARDCONTEXT, LPCSTR, LPSCARD_READERSTATEA, DWORD);
+LONG STDCALL SCardLocateCardsW(SCARDCONTEXT, LPCWSTR, LPSCARD_READERSTATEW, DWORD);
+LONG STDCALL SCardLocateCardsByATRA(SCARDCONTEXT, LPSCARD_ATRMASK, DWORD, LPSCARD_READERSTATEA, DWORD);
+LONG STDCALL SCardLocateCardsByATRW(SCARDCONTEXT, LPSCARD_ATRMASK, DWORD, LPSCARD_READERSTATEW, DWORD);
+LONG STDCALL SCardReconnect(SCARDHANDLE, DWORD, DWORD, DWORD, LPDWORD);
+LONG STDCALL SCardReleaseContext(SCARDCONTEXT);
+VOID STDCALL SCardReleaseStartedEvent(HANDLE);
+LONG STDCALL SCardRemoveReaderFromGroupA(SCARDCONTEXT, LPCSTR, LPCSTR);
+LONG STDCALL SCardRemoveReaderFromGroupW(SCARDCONTEXT, LPCWSTR, LPCWSTR);
+LONG STDCALL SCardSetAttrib(SCARDHANDLE, DWORD, LPCBYTE, DWORD);
+LONG STDCALL SCardSetCardTypeProviderNameA(SCARDCONTEXT, LPCSTR, DWORD, LPCSTR);
+LONG STDCALL SCardSetCardTypeProviderNameW(SCARDCONTEXT, LPCWSTR, DWORD, LPCWSTR);
+LONG STDCALL SCardState(SCARDHANDLE, LPDWORD, LPDWORD, LPBYTE, LPDWORD);
+LONG STDCALL SCardStatusA(SCARDHANDLE, LPSTR, LPDWORD, LPDWORD, LPDWORD, LPBYTE, LPDWORD);
+LONG STDCALL SCardStatusW(SCARDHANDLE, LPWSTR, LPDWORD, LPDWORD, LPDWORD, LPBYTE, LPDWORD);
+LONG STDCALL SCardTransmit(SCARDHANDLE, LPCSCARD_IO_REQUEST, LPCBYTE, DWORD, LPSCARD_IO_REQUEST, LPBYTE, LPDWORD);
+
+#ifndef _DISABLE_TIDENTS
+
+#ifdef UNICODE
+typedef struct SCARD_READERSTATEW SCARD_READERSTATE, *PSCARD_READERSTATE, *LPSCARD_READERSTATE;
+#define SCardAddReaderToGroup SCardAddReaderToGroupW
+#define SCardConnect SCardConnectW
+#define SCardForgetCardType SCardForgetCardTypeW
+#define SCardForgetReader SCardForgetReaderW
+#define SCardForgetReaderGroup SCardForgetReaderGroupW
+#define SCardGetCardTypeProviderName SCardGetCardTypeProviderNameW
+#define SCardGetProviderId SCardGetProviderIdW
+#define SCardGetStatusChange SCardGetStatusChangeW
+#define SCardIntroduceCardType SCardIntroduceCardTypeW
+#define SCardIntroduceReader SCardIntroduceReaderW
+#define SCardIntroduceReaderGroup SCardIntroduceReaderGroupW
+#define SCardListCards SCardListCardsW
+#define SCardListInterfaces SCardListInterfacesW
+#define SCardListReaderGroups SCardListReaderGroupsW
+#define SCardListReaders SCardListReadersW
+#define SCardLocateCards SCardLocateCardsW
+#define SCardLocateCardsByATR SCardLocateCardsByATRW
+#define SCardRemoveReaderFromGroup SCardRemoveReaderFromGroupW
+#define SCardSetCardTypeProviderName SCardSetCardTypeProviderNameW
+#define SCardStatus SCardStatusW
+#else /* !UNICODE */
+typedef struct SCARD_READERSTATEW SCARD_READERSTATE, *PSCARD_READERSTATE, *LPSCARD_READERSTATE;
+#define SCardAddReaderToGroup SCardAddReaderToGroupA
+#define SCardConnect SCardConnectA
+#define SCardForgetCardType SCardForgetCardTypeA
+#define SCardForgetReader SCardForgetReaderA
+#define SCardForgetReaderGroup SCardForgetReaderGroupA
+#define SCardGetCardTypeProviderName SCardGetCardTypeProviderNameA
+#define SCardGetProviderId SCardGetProviderIdA
+#define SCardGetStatusChange SCardGetStatusChangeA
+#define SCardIntroduceCardType SCardIntroduceCardTypeA
+#define SCardIntroduceReader SCardIntroduceReaderA
+#define SCardIntroduceReaderGroup SCardIntroduceReaderGroupA
+#define SCardListCards SCardListCardsA
+#define SCardListInterfaces SCardListInterfacesA
+#define SCardListReaderGroups SCardListReaderGroupsA
+#define SCardListReaders SCardListReadersA
+#define SCardLocateCards SCardLocateCardsA
+#define SCardLocateCardsByATR SCardLocateCardsByATRA
+#define SCardRemoveReaderFromGroup SCardRemoveReaderFromGroupA
+#define SCardSetCardTypeProviderName SCardSetCardTypeProviderNameA
+#define SCardStatus SCardStatusA
+#endif /* UNICODE */
+
+#endif /* _DISABLE_TIDENTS */
+
+extern const SCARD_IO_REQUEST g_rgSCardT0Pci;
+extern const SCARD_IO_REQUEST g_rgSCardT1Pci;
+extern const SCARD_IO_REQUEST g_rgSCardRawPci;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __WINSCARD_H */
+
+/* EOF */
reactos/include
diff -N WinSmCrd.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ WinSmCrd.h 7 Nov 2004 15:37:40 -0000 1.1
@@ -0,0 +1,214 @@
+/*
+ * WinSmCrd.h
+ *
+ * SmartCard IOCTLs
+ *
+ * THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ * This source code is offered for use in the public domain. You may
+ * use, modify or distribute it freely.
+ *
+ * This code is distributed in the hope that it will be useful but
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ * DISCLAIMED. This includes but is not limited to warranties of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+#ifndef __WINSMCRD_H
+#define __WINSMCRD_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _SCARD_IO_REQUEST
+{
+ DWORD dwProtocol;
+ DWORD cbPciLength;
+} SCARD_IO_REQUEST, *PSCARD_IO_REQUEST, *LPSCARD_IO_REQUEST;
+typedef const SCARD_IO_REQUEST *LPCSCARD_IO_REQUEST;
+
+typedef struct _SCARD_T0_COMMAND
+{
+ BYTE bCla;
+ BYTE bIns;
+ BYTE P1;
+ BYTE P2;
+ BYTE P3
+} SCARD_T0_COMMAND, *PSCARD_T0_COMMAND, *LPSCARD_T0_COMMAND;
+
+typedef struct _SCARD_T0_REQUEST
+{
+ SCARD_IO_REQUEST ioRequest;
+ BYTE bSw1;
+ BYTE bSw2;
+ union
+ {
+ SCARD_T0_COMMAND CmdBytes;
+ BYTE rgbHeader[5];
+ } u;
+} SCARD_T0_REQUEST, *PSCARD_T0_REQUEST, *LPSCARD_T0_REQUEST;
+
+typedef struct _SCARD_T1_REQUEST
+{
+ SCARD_IO_REQUEST ioRequest;
+} SCARD_T1_REQUEST, *PSCARD_T1_REQUEST, *LPSCARD_T1_REQUEST;
+
+#define FILE_DEVICE_SMARTCARD (0x00000031)
+
+#define SCARD_ATR_LENGTH (0x21)
+
+#define SCARD_PROTOCOL_UNDEFINED (0x00000)
+#define SCARD_PROTOCOL_T0 (0x00001)
+#define SCARD_PROTOCOL_T1 (0x00002)
+#define SCARD_PROTOCOL_RAW (0x10000)
+
+#define SCARD_PROTOCOL_Tx (SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1)
+
+#define SCARD_PROTOCOL_DEFAULT (0x80000000)
+#define SCARD_PROTOCOL_OPTIMAL (0x00000000)
+
+#define SCARD_T0_HEADER_LENGTH (0x7)
+#define SCARD_T0_CMD_LENGTH (0x5)
+
+#define SCARD_T1_PROLOGUE_LENGTH (0x03)
+#define SCARD_T1_EPILOGUE_LENGTH (0x02)
+#define SCARD_T1_MAX_IFS (0xFE)
+
+#define SCARD_POWER_DOWN (0x0)
+#define SCARD_COLD_RESET (0x1)
+#define SCARD_WARM_RESET (0x2)
+
+#define SCARD_UNKNOWN (0x0)
+#define SCARD_ABSENT (0x1)
+#define SCARD_PRESENT (0x2)
+#define SCARD_SWALLOWED (0x3)
+#define SCARD_POWERED (0x4)
+#define SCARD_NEGOTIABLE (0x5)
+#define SCARD_SPECIFIC (0x6)
+
+#define IOCTL_SMARTCARD_POWER CTL_CODE(FILE_DEVICE_SMARTCARD, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_GET_ATTRIBUTE CTL_CODE(FILE_DEVICE_SMARTCARD, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_SET_ATTRIBUTE CTL_CODE(FILE_DEVICE_SMARTCARD, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_CONFISCATE CTL_CODE(FILE_DEVICE_SMARTCARD, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_TRANSMIT CTL_CODE(FILE_DEVICE_SMARTCARD, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_EJECT CTL_CODE(FILE_DEVICE_SMARTCARD, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_SWALLOW CTL_CODE(FILE_DEVICE_SMARTCARD, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_READ CTL_CODE(FILE_DEVICE_SMARTCARD, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_WRITE CTL_CODE(FILE_DEVICE_SMARTCARD, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_IS_PRESENT CTL_CODE(FILE_DEVICE_SMARTCARD, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_IS_ABSENT CTL_CODE(FILE_DEVICE_SMARTCARD, 11, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_SET_PROTOCOL CTL_CODE(FILE_DEVICE_SMARTCARD, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_GET_STATE CTL_CODE(FILE_DEVICE_SMARTCARD, 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_GET_LAST_ERROR CTL_CODE(FILE_DEVICE_SMARTCARD, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_SMARTCARD_GET_PERF_CNTR CTL_CODE(FILE_DEVICE_SMARTCARD, 16, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+#define MAXIMUM_ATTR_STRING_LENGTH (0x10)
+#define MAXIMUM_SMARTCARD_READERS (0x0A)
+
+#define SCARD_CLASS_VENDOR_INFO (0x0001)
+#define SCARD_CLASS_COMMUNICATIONS (0x0002)
+#define SCARD_CLASS_PROTOCOL (0x0003)
+#define SCARD_CLASS_POWER_MGMT (0x0004)
+#define SCARD_CLASS_SECURITY (0x0005)
+#define SCARD_CLASS_MECHANICAL (0x0006)
+#define SCARD_CLASS_VENDOR_DEFINED (0x0007)
+#define SCARD_CLASS_IFD_PROTOCOL (0x0008)
+#define SCARD_CLASS_ICC_STATE (0x0009)
+#define SCARD_CLASS_PERF (0x7FFE)
+#define SCARD_CLASS_SYSTEM (0x7FFF)
+
+#define SCARD_READER_TYPE_VENDOR (0xF0)
+
+#define SCARD_READER_TYPE_SERIAL (0x01)
+#define SCARD_READER_TYPE_PARALELL (0x02)
+#define SCARD_READER_TYPE_KEYBOARD (0x04)
+#define SCARD_READER_TYPE_SCSI (0x08)
+#define SCARD_READER_TYPE_IDE (0x10)
+#define SCARD_READER_TYPE_USB (0x20)
+#define SCARD_READER_TYPE_PCMCIA (0x40)
+
+#define SCARD_READER_SWALLOWS (0x1)
+#define SCARD_READER_EJECTS (0x2)
+#define SCARD_READER_CONFISCATES (0x4)
+
+#define SCARD_ATTR_VALUE(Class, Tag) \
+ (((ULONG)(Class) << 16) | (ULONG)(Tag))
+
+#define SCARD_ATTR_VENDOR_NAME SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0100)
+#define SCARD_ATTR_VENDOR_IFD_TYPE SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0101)
+#define SCARD_ATTR_VENDOR_IFD_VERSION SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0102)
+#define SCARD_ATTR_VENDOR_IFD_SERIAL_NO SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0103)
+
+#define SCARD_ATTR_CHANNEL_ID SCARD_ATTR_VALUE(SCARD_CLASS_COMMUNICATIONS, 0x0110)
+
+#define SCARD_ATTR_PROTOCOL_TYPES SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0120)
+#define SCARD_ATTR_ASYNC_PROTOCOL_TYPES SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0120)
+#define SCARD_ATTR_DEFAULT_CLK SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0121)
+#define SCARD_ATTR_MAX_CLK SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0122)
+#define SCARD_ATTR_DEFAULT_DATA_RATE SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0123)
+#define SCARD_ATTR_MAX_DATA_RATE SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0124)
+#define SCARD_ATTR_MAX_IFSD SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0125)
+#define SCARD_ATTR_SYNC_PROTOCOL_TYPES SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0126)
+
+#define SCARD_ATTR_POWER_MGMT_SUPPORT SCARD_ATTR_VALUE(SCARD_CLASS_POWER_MGMT, 0x0131)
+
+#define SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE SCARD_ATTR_VALUE(SCARD_CLASS_SECURITY, 0x0140)
+#define SCARD_ATTR_USER_AUTH_INPUT_DEVICE SCARD_ATTR_VALUE(SCARD_CLASS_SECURITY, 0x0142)
+
+#define SCARD_ATTR_CHARACTERISTICS SCARD_ATTR_VALUE(SCARD_CLASS_MECHANICAL, 0x0150)
+
+#define SCARD_ATTR_CURRENT_PROTOCOL_TYPE SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0201)
+#define SCARD_ATTR_CURRENT_CLK SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0202)
+#define SCARD_ATTR_CURRENT_F SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0203)
+#define SCARD_ATTR_CURRENT_D SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0204)
+#define SCARD_ATTR_CURRENT_N SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0205)
+#define SCARD_ATTR_CURRENT_W SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0206)
+#define SCARD_ATTR_CURRENT_IFSC SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0207)
+#define SCARD_ATTR_CURRENT_IFSD SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0208)
+#define SCARD_ATTR_CURRENT_BWT SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0209)
+#define SCARD_ATTR_CURRENT_CWT SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x020A)
+#define SCARD_ATTR_CURRENT_EBC_ENCODING SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x020B)
+#define SCARD_ATTR_EXTENDED_BWT SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x020C)
+
+#define SCARD_ATTR_ICC_PRESENCE SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0300)
+#define SCARD_ATTR_ICC_INTERFACE_STATUS SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0301)
+#define SCARD_ATTR_CURRENT_IO_STATE SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0302)
+#define SCARD_ATTR_ATR_STRING SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0303)
+#define SCARD_ATTR_ICC_TYPE_PER_ATR SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0304)
+
+#define SCARD_ATTR_ESC_RESET SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA000)
+#define SCARD_ATTR_ESC_CANCEL SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA003)
+#define SCARD_ATTR_ESC_AUTHREQUEST SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA005)
+#define SCARD_ATTR_MAXINPUT SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA007)
+
+#define SCARD_ATTR_DEVICE_UNIT SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0001)
+#define SCARD_ATTR_DEVICE_IN_USE SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0002)
+#define SCARD_ATTR_DEVICE_FRIENDLY_NAME_A SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0003)
+#define SCARD_ATTR_DEVICE_SYSTEM_NAME_A SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0004)
+#define SCARD_ATTR_DEVICE_FRIENDLY_NAME_W SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0005)
+#define SCARD_ATTR_DEVICE_SYSTEM_NAME_W SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0006)
+#define SCARD_ATTR_SUPRESS_T1_IFS_REQUEST SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0007)
+
+#define SCARD_PERF_NUM_TRANSMISSIONS SCARD_ATTR_VALUE(SCARD_CLASS_PERF, 0x0001)
+#define SCARD_PERF_BYTES_TRANSMITTED SCARD_ATTR_VALUE(SCARD_CLASS_PERF, 0x0002)
+#define SCARD_PERF_TRANSMISSION_TIME SCARD_ATTR_VALUE(SCARD_CLASS_PERF, 0x0003)
+
+#ifdef UNICODE
+#define SCARD_ATTR_DEVICE_FRIENDLY_NAME SCARD_ATTR_DEVICE_FRIENDLY_NAME_W
+#define SCARD_ATTR_DEVICE_SYSTEM_NAME SCARD_ATTR_DEVICE_SYSTEM_NAME_W
+#else /* !UNICODE */
+#define SCARD_ATTR_DEVICE_FRIENDLY_NAME SCARD_ATTR_DEVICE_FRIENDLY_NAME_A
+#define SCARD_ATTR_DEVICE_SYSTEM_NAME SCARD_ATTR_DEVICE_SYSTEM_NAME_A
+#endif /* UNICODE */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __WINSMCRD_H */
+
+/* EOF */
reactos/lib/winscard
diff -N .cvsignore
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ .cvsignore 7 Nov 2004 15:37:41 -0000 1.1
@@ -0,0 +1,8 @@
+*.coff
+*.dll
+*.d
+*.a
+*.o
+*.sym
+*.map
+*.tmp
reactos/lib/winscard
diff -N Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Makefile 7 Nov 2004 15:37:41 -0000 1.1
@@ -0,0 +1,50 @@
+# $Id: Makefile,v 1.1 2004/11/07 15:37:41 weiden Exp $
+
+PATH_TO_TOP = ../..
+
+TARGET_TYPE = dynlink
+
+TARGET_NAME = winscard
+
+TARGET_INSTALLDIR = system32
+
+TARGET_BASE = $(TARGET_BASE_LIB_WINFAX)
+
+TARGET_CFLAGS = \
+ -D__USE_W32API \
+ -DUNICODE \
+ -D_UNICODE \
+ -D__REACTOS__ \
+ -D_WIN32_IE=0x0500 \
+ -D_WIN32_WINNT=0x502 \
+ -DWINVER=0x600 \
+ -Wall \
+ -Werror \
+ -fno-builtin
+
+TARGET_LFLAGS = -nostartfiles -nostdlib
+
+TARGET_SDKLIBS = ntdll.a rosrtl.a kernel32.a
+
+TARGET_GCCLIBS = gcc
+
+TARGET_PCH = precomp.h
+
+TARGET_CLEAN =
+
+TARGET_OBJECTS = winscard.o
+
+TARGET_ENTRY = 0x00000000
+
+DEP_OBJECTS = $(TARGET_OBJECTS)
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
+
+include $(TOOLS_PATH)/depend.mk
+
+%/TAGS:
+ etags -o $(@D)/TAGS $(@D)/\*.c
+
+etags: ./TAGS
reactos/lib/winscard
diff -N precomp.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ precomp.h 7 Nov 2004 15:37:41 -0000 1.1
@@ -0,0 +1,10 @@
+#include <windows.h>
+#include <WinSCard.h>
+
+/* INTERNAL *******************************************************************/
+
+ULONG DbgPrint(PCH Format,...);
+#define UNIMPLEMENTED \
+ DbgPrint("%s:%i: %s() UNIMPLEMENTED!\n", __FILE__, __LINE__, __FUNCTION__)
+
+/* EOF */
reactos/lib/winscard
diff -N winscard.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ winscard.c 7 Nov 2004 15:37:41 -0000 1.1
@@ -0,0 +1,857 @@
+/*
+ * ReactOS SmartCard API
+ * Copyright (C) 2004 ReactOS Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+/* $Id: winscard.c,v 1.1 2004/11/07 15:37:41 weiden Exp $
+ *
+ * PROJECT: ReactOS SmartCard API
+ * FILE: lib/winscard/winscard.c
+ * PURPOSE: ReactOS SmartCard API
+ * PROGRAMMER: Thomas Weidenmueller <w3seek@reactos.com>
+ *
+ * UPDATE HISTORY:
+ * 11/07/2004 Created
+ */
+#include "precomp.h"
+
+const SCARD_IO_REQUEST g_rgSCardT0Pci;
+const SCARD_IO_REQUEST g_rgSCardT1Pci;
+const SCARD_IO_REQUEST g_rgSCardRawPci;
+
+/*
+ * @unimplemented
+ */
+HANDLE
+STDCALL
+SCardAccessStartedEvent(VOID)
+{
+ UNIMPLEMENTED;
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return NULL;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardAddReaderToGroupA(SCARDCONTEXT hContext,
+ LPCSTR szReaderName,
+ LPCSTR szGroupName)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardAddReaderToGroupW(SCARDCONTEXT hContext,
+ LPCWSTR szReaderName,
+ LPCWSTR szGroupName)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardBeginTransaction(SCARDHANDLE hCard)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardCancel(SCARDCONTEXT hContext)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardConnectA(SCARDCONTEXT hContext,
+ LPCSTR szReader,
+ DWORD dwShareMode,
+ DWORD dwPreferredProtocols,
+ LPSCARDHANDLE phCard,
+ LPDWORD pdwActiveProtocol)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardConnectW(SCARDCONTEXT hContext,
+ LPCWSTR szReader,
+ DWORD dwShareMode,
+ DWORD dwPreferredProtocols,
+ LPSCARDHANDLE phCard,
+ LPDWORD pdwActiveProtocol)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardControl(SCARDHANDLE hCard,
+ DWORD dwControlCode,
+ LPCVOID lpInBuffer,
+ DWORD nInBufferSize,
+ LPVOID lpOutBuffer,
+ DWORD nOutBufferSize,
+ LPDWORD lpBytesReturned)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardDisconnect(SCARDHANDLE hCard,
+ DWORD dwDisposition)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardEndTransaction(SCARDHANDLE hCard,
+ DWORD dwDisposition)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardEstablishContext(DWORD dwScope,
+ LPCVOID pvReserved1,
+ LPCVOID pvReserved2,
+ LPSCARDCONTEXT phContext)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardForgetCardTypeA(SCARDCONTEXT hContext,
+ LPCSTR szCardName)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardForgetCardTypeW(SCARDCONTEXT hContext,
+ LPCWSTR szCardName)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardForgetReaderA(SCARDCONTEXT hContext,
+ LPCSTR szReaderName)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardForgetReaderW(SCARDCONTEXT hContext,
+ LPCWSTR szReaderName)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardForgetReaderGroupA(SCARDCONTEXT hContext,
+ LPCSTR szGroupName)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardForgetReaderGroupW(SCARDCONTEXT hContext,
+ LPCWSTR szGroupName)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardFreeMemory(SCARDCONTEXT hContext,
+ LPCVOID pvMem)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardGetAttrib(SCARDHANDLE hCard,
+ DWORD dwAttrId,
+ LPBYTE pbAttr,
+ LPDWORD pcbAttrLen)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardGetCardTypeProviderNameA(SCARDCONTEXT hContext,
+ LPCSTR szCardName,
+ DWORD dwProviderId,
+ LPSTR szProvider,
+ LPDWORD pcchProvider)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardGetCardTypeProviderNameW(SCARDCONTEXT hContext,
+ LPCWSTR szCardName,
+ DWORD dwProviderId,
+ LPWSTR szProvider,
+ LPDWORD pcchProvider)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardGetProviderIdA(SCARDCONTEXT hContext,
+ LPCSTR szCard,
+ LPGUID pguidProviderId)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardGetProviderIdW(SCARDCONTEXT hContext,
+ LPCWSTR szCard,
+ LPGUID pguidProviderId)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardGetStatusChangeA(SCARDCONTEXT hContext,
+ DWORD dwTimeout,
+ LPSCARD_READERSTATEA rgReaderState,
+ DWORD cReaders)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardGetStatusChangeW(SCARDCONTEXT hContext,
+ DWORD dwTimeout,
+ LPSCARD_READERSTATEW rgReaderState,
+ DWORD cReaders)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardIntroduceCardTypeA(SCARDCONTEXT hContext,
+ LPCSTR szCardName,
+ LPCGUID pguidPrimaryProvider,
+ LPCGUID rgguidInterfaces,
+ DWORD dwInterfaceCount,
+ LPCBYTE pbAtr,
+ LPCBYTE pbAtrMask,
+ DWORD cbAtrLen)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardIntroduceCardTypeW(SCARDCONTEXT hContext,
+ LPCWSTR szCardName,
+ LPCGUID pguidPrimaryProvider,
+ LPCGUID rgguidInterfaces,
+ DWORD dwInterfaceCount,
+ LPCBYTE pbAtr,
+ LPCBYTE pbAtrMask,
+ DWORD cbAtrLen)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardIntroduceReaderA(SCARDCONTEXT hContext,
+ LPCSTR szReaderName,
+ LPCSTR szDeviceName)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardIntroduceReaderW(SCARDCONTEXT hContext,
+ LPCWSTR szReaderName,
+ LPCWSTR szDeviceName)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardIntroduceReaderGroupA(SCARDCONTEXT hContext,
+ LPCSTR szGroupName)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardIntroduceReaderGroupW(SCARDCONTEXT hContext,
+ LPCWSTR szGroupName)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardIsValidContext(SCARDCONTEXT hContext)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardListCardsA(SCARDCONTEXT hContext,
+ LPCBYTE pbAtr,
+ LPCGUID rgguidInterface,
+ DWORD cguidInterfaceCount,
+ LPCSTR mszCards,
+ LPDWORD pcchCards)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardListCardsW(SCARDCONTEXT hContext,
+ LPCBYTE pbAtr,
+ LPCGUID rgguidInterface,
+ DWORD cguidInterfaceCount,
+ LPCWSTR mszCards,
+ LPDWORD pcchCards)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardListInterfacesA(SCARDCONTEXT hContext,
+ LPCSTR szCard,
+ LPGUID pguidInterfaces,
+ LPDWORD pcguidInteraces)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardListInterfacesW(SCARDCONTEXT hContext,
+ LPCWSTR szCard,
+ LPGUID pguidInterfaces,
+ LPDWORD pcguidInteraces)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardListReaderGroupsA(SCARDCONTEXT hContext,
+ LPSTR mszGroups,
+ LPDWORD pcchGroups)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardListReaderGroupsW(SCARDCONTEXT hContext,
+ LPWSTR mszGroups,
+ LPDWORD pcchGroups)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardListReadersA(SCARDCONTEXT Context,
+ LPCSTR mszGroups,
+ LPSTR mszReaders,
+ LPDWORD pcchReaders)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardListReadersW(SCARDCONTEXT Context,
+ LPCWSTR mszGroups,
+ LPWSTR mszReaders,
+ LPDWORD pcchReaders)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardLocateCardsA(SCARDCONTEXT hContext,
+ LPCSTR mszCards,
+ LPSCARD_READERSTATEA rgReaderStates,
+ DWORD cReaders)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardLocateCardsW(SCARDCONTEXT hContext,
+ LPCWSTR mszCards,
+ LPSCARD_READERSTATEW rgReaderStates,
+ DWORD cReaders)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardLocateCardsByATRA(SCARDCONTEXT hContext,
+ LPSCARD_ATRMASK rgAtrMasks,
+ DWORD cAtrs,
+ LPSCARD_READERSTATEA rgReaderStates,
+ DWORD cReaders)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardLocateCardsByATRW(SCARDCONTEXT hContext,
+ LPSCARD_ATRMASK rgAtrMasks,
+ DWORD cAtrs,
+ LPSCARD_READERSTATEW rgReaderStates,
+ DWORD cReaders)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardReconnect(SCARDHANDLE hCard,
+ DWORD dwShareMode,
+ DWORD dwPreferredProtocols,
+ DWORD dwInitialization,
+ LPDWORD pdwActiveProtocol)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardReleaseContext(SCARDCONTEXT hContext)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+VOID
+STDCALL
+SCardReleaseStartedEvent(HANDLE hStartedEventHandle)
+{
+ UNIMPLEMENTED;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardRemoveReaderFromGroupA(SCARDCONTEXT hContext,
+ LPCSTR szReaderName,
+ LPCSTR szGroupname)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardRemoveReaderFromGroupW(SCARDCONTEXT hContext,
+ LPCWSTR szReaderName,
+ LPCWSTR szGroupname)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardSetAttrib(SCARDHANDLE hCard,
+ DWORD dwAttrId,
+ LPCBYTE pbAttr,
+ DWORD cbAttrLen)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardSetCardTypeProviderNameA(SCARDCONTEXT hContext,
+ LPCSTR szCardName,
+ DWORD dwProviderId,
+ LPCSTR szProvider)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardSetCardTypeProviderNameW(SCARDCONTEXT hContext,
+ LPCWSTR szCardName,
+ DWORD dwProviderId,
+ LPCWSTR szProvider)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardState(SCARDHANDLE hCard,
+ LPDWORD pdwState,
+ LPDWORD pdwProtocol,
+ LPBYTE pbAtr,
+ LPDWORD pcbAtrlen)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardStatusA(SCARDHANDLE hCard,
+ LPSTR szReaderName,
+ LPDWORD pcchReaderLen,
+ LPDWORD pdwState,
+ LPDWORD pdwProtocol,
+ LPBYTE pbAtr,
+ LPDWORD pcbAtrLen)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardStatusW(SCARDHANDLE hCard,
+ LPWSTR szReaderName,
+ LPDWORD pcchReaderLen,
+ LPDWORD pdwState,
+ LPDWORD pdwProtocol,
+ LPBYTE pbAtr,
+ LPDWORD pcbAtrLen)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
+
+/*
+ * @unimplemented
+ */
+LONG
+STDCALL
+SCardTransmit(SCARDHANDLE hCard,
+ LPCSCARD_IO_REQUEST pioSendPci,
+ LPCBYTE pbSendBuffer,
+ DWORD cbSendLength,
+ LPSCARD_IO_REQUEST pioRecvPci,
+ LPBYTE pbRecvBuffer,
+ LPDWORD pcbRecvLength)
+{
+ UNIMPLEMENTED;
+ return SCARD_F_UNKNOWN_ERROR;
+}
+
reactos/lib/winscard
diff -N winscard.def
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ winscard.def 7 Nov 2004 15:37:41 -0000 1.1
@@ -0,0 +1,68 @@
+LIBRARY winscard.dll
+
+EXPORTS
+;ClassInstall32@0 @1
+;SCardAccessNewReaderEvent@0 @2
+;SCardReleaseAllEvents@0 @3
+;SCardReleaseNewReaderEvent@0 @4
+SCardAccessStartedEvent@0 @5
+SCardAddReaderToGroupA@12 @6
+SCardAddReaderToGroupW@12 @7
+SCardBeginTransaction@4 @8
+SCardCancel@4 @9
+SCardConnectA@24 @10
+SCardConnectW@24 @11
+SCardControl@28 @12
+SCardDisconnect@8 @13
+SCardEndTransaction@8 @14
+SCardEstablishContext@16 @15
+SCardForgetCardTypeA@8 @16
+SCardForgetCardTypeW@8 @17
+SCardForgetReaderA@8 @18
+SCardForgetReaderGroupA@8 @19
+SCardForgetReaderGroupW@8 @20
+SCardForgetReaderW@8 @21
+SCardFreeMemory@8 @22
+SCardGetAttrib@16 @23
+SCardGetCardTypeProviderNameA@20 @24
+SCardGetCardTypeProviderNameW@20 @25
+SCardGetProviderIdA@12 @26
+SCardGetProviderIdW@12 @27
+SCardGetStatusChangeA@16 @28
+SCardGetStatusChangeW@16 @29
+SCardIntroduceCardTypeA@32 @30
+SCardIntroduceCardTypeW@32 @31
+SCardIntroduceReaderA@12 @32
+SCardIntroduceReaderGroupA@8 @33
+SCardIntroduceReaderGroupW@8 @34
+SCardIntroduceReaderW@12 @35
+SCardIsValidContext@4 @36
+SCardListCardsA@24 @37
+SCardListCardsW@24 @38
+SCardListInterfacesA@16 @39
+SCardListInterfacesW@16 @40
+SCardListReaderGroupsA@12 @41
+SCardListReaderGroupsW@12 @42
+SCardListReadersA@16 @43
+SCardListReadersW@16 @44
+SCardLocateCardsA@16 @45
+SCardLocateCardsByATRA@20 @46
+SCardLocateCardsByATRW@20 @47
+SCardLocateCardsW@16 @48
+SCardReconnect@20 @49
+SCardReleaseContext@4 @50
+SCardReleaseStartedEvent@4 @51
+SCardRemoveReaderFromGroupA@12 @52
+SCardRemoveReaderFromGroupW@12 @53
+SCardSetAttrib@16 @54
+SCardSetCardTypeProviderNameA@16 @55
+SCardSetCardTypeProviderNameW@16 @56
+SCardState@20 @57
+SCardStatusA@28 @58
+SCardStatusW@28 @59
+SCardTransmit@28 @60
+g_rgSCardRawPci @61 DATA
+g_rgSCardT0Pci @62 DATA
+g_rgSCardT1Pci @63 DATA
+
+; EOF
reactos/lib/winscard
diff -N winscard.rc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ winscard.rc 7 Nov 2004 15:37:41 -0000 1.1
@@ -0,0 +1,7 @@
+/* $Id: winscard.rc,v 1.1 2004/11/07 15:37:41 weiden Exp $ */
+
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "ReactOS SmartCard API\0"
+#define REACTOS_STR_INTERNAL_NAME "winscard\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "winscard.dll\0"
+#include <reactos/version.rc>
CVSspam 0.2.8