diff --git a/.gitignore b/.gitignore index af69a26d2be..be4fb6fd957 100644 --- a/.gitignore +++ b/.gitignore @@ -652,6 +652,8 @@ dlls/winmm/tests/winmm_crosstest.exe dlls/winmm/winmm_res.res dlls/winnls.dll16 dlls/winnls32/libwinnls32.def +dlls/winscard/libwinscard.def +dlls/winscard/rsrc.res dlls/winsock.dll16 dlls/winspool.drv/libwinspool.def dlls/winspool.drv/tests/*.ok diff --git a/Makefile.in b/Makefile.in index 3b16428c2b5..6c9bdef55e8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -419,6 +419,7 @@ ALL_MAKEFILES = \ dlls/winmm/Makefile \ dlls/winmm/tests/Makefile \ dlls/winnls32/Makefile \ + dlls/winscard/Makefile \ dlls/winspool.drv/Makefile \ dlls/winspool.drv/tests/Makefile \ dlls/wintab32/Makefile \ @@ -768,6 +769,7 @@ dlls/wininet/tests/Makefile: dlls/wininet/tests/Makefile.in dlls/Maketest.rules dlls/winmm/Makefile: dlls/winmm/Makefile.in dlls/Makedll.rules dlls/winmm/tests/Makefile: dlls/winmm/tests/Makefile.in dlls/Maketest.rules dlls/winnls32/Makefile: dlls/winnls32/Makefile.in dlls/Makedll.rules +dlls/winscard/Makefile: dlls/winscard/Makefile.in dlls/Makedll.rules dlls/winspool.drv/Makefile: dlls/winspool.drv/Makefile.in dlls/Makedll.rules dlls/winspool.drv/tests/Makefile: dlls/winspool.drv/tests/Makefile.in dlls/Maketest.rules dlls/wintab32/Makefile: dlls/wintab32/Makefile.in dlls/Makedll.rules diff --git a/configure b/configure index f6034fe9b6f..822c1bcb82e 100755 --- a/configure +++ b/configure @@ -20907,6 +20907,8 @@ ac_config_files="$ac_config_files dlls/winmm/tests/Makefile" ac_config_files="$ac_config_files dlls/winnls32/Makefile" +ac_config_files="$ac_config_files dlls/winscard/Makefile" + ac_config_files="$ac_config_files dlls/winspool.drv/Makefile" ac_config_files="$ac_config_files dlls/winspool.drv/tests/Makefile" @@ -21880,6 +21882,7 @@ do "dlls/winmm/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/winmm/Makefile" ;; "dlls/winmm/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/winmm/tests/Makefile" ;; "dlls/winnls32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/winnls32/Makefile" ;; + "dlls/winscard/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/winscard/Makefile" ;; "dlls/winspool.drv/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/winspool.drv/Makefile" ;; "dlls/winspool.drv/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/winspool.drv/tests/Makefile" ;; "dlls/wintab32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/wintab32/Makefile" ;; diff --git a/configure.ac b/configure.ac index 22de21f1a77..8c9b427a802 100644 --- a/configure.ac +++ b/configure.ac @@ -1749,6 +1749,7 @@ AC_CONFIG_FILES([dlls/wininet/tests/Makefile]) AC_CONFIG_FILES([dlls/winmm/Makefile]) AC_CONFIG_FILES([dlls/winmm/tests/Makefile]) AC_CONFIG_FILES([dlls/winnls32/Makefile]) +AC_CONFIG_FILES([dlls/winscard/Makefile]) AC_CONFIG_FILES([dlls/winspool.drv/Makefile]) AC_CONFIG_FILES([dlls/winspool.drv/tests/Makefile]) AC_CONFIG_FILES([dlls/wintab32/Makefile]) diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 159bb2da5ba..5bb4e3a0967 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -207,6 +207,7 @@ BASEDIRS = \ wininet \ winmm \ winnls32 \ + winscard \ winspool.drv \ wintab32 \ wintrust \ @@ -574,6 +575,7 @@ IMPORT_LIBS = \ wininet/libwininet.$(IMPLIBEXT) \ winmm/libwinmm.$(IMPLIBEXT) \ winnls32/libwinnls32.$(IMPLIBEXT) \ + winscard/libwinscard.$(IMPLIBEXT) \ winspool.drv/libwinspool.$(IMPLIBEXT) \ wintab32/libwintab32.$(IMPLIBEXT) \ wintrust/libwintrust.$(IMPLIBEXT) \ @@ -927,6 +929,9 @@ winmm/libwinmm.$(IMPLIBEXT): winmm/winmm.spec $(WINEBUILD) winnls32/libwinnls32.$(IMPLIBEXT): winnls32/winnls32.spec $(WINEBUILD) @cd winnls32 && $(MAKE) libwinnls32.$(IMPLIBEXT) +winscard/libwinscard.$(IMPLIBEXT): winscard/winscard.spec $(WINEBUILD) + @cd winscard && $(MAKE) libwinscard.$(IMPLIBEXT) + winspool.drv/libwinspool.$(IMPLIBEXT): winspool.drv/winspool.drv.spec $(WINEBUILD) @cd winspool.drv && $(MAKE) libwinspool.$(IMPLIBEXT) diff --git a/dlls/winscard/Makefile.in b/dlls/winscard/Makefile.in new file mode 100644 index 00000000000..de8a2b6b474 --- /dev/null +++ b/dlls/winscard/Makefile.in @@ -0,0 +1,17 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = winscard.dll +IMPORTLIB = libwinscard.$(IMPLIBEXT) +IMPORTS = kernel32 + +C_SRCS = \ + winscard.c + +RC_SRCS = \ + rsrc.rc + +@MAKE_DLL_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winscard/rsrc.rc b/dlls/winscard/rsrc.rc new file mode 100644 index 00000000000..8226e9d9f53 --- /dev/null +++ b/dlls/winscard/rsrc.rc @@ -0,0 +1,33 @@ +/* + * Top level resource file for winscard.dll + * + * Copyright 2007 Mounir IDRASSI (mounir.idrassi@idrix.fr, for IDRIX) + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winver.h" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +#define WINE_FILEDESCRIPTION_STR "Wine Smart Card API" +#define WINE_FILENAME_STR "winscard.dll" +#define WINE_FILEVERSION 5,1,2600,2180 +#define WINE_FILEVERSION_STR "5.1.2600.2180" + +#include "wine/wine_common_ver.rc" diff --git a/dlls/winscard/winscard.c b/dlls/winscard/winscard.c new file mode 100644 index 00000000000..d24e0f9290a --- /dev/null +++ b/dlls/winscard/winscard.c @@ -0,0 +1,52 @@ +/* + * Copyright 2007 Mounir IDRASSI (mounir.idrassi@idrix.fr, for IDRIX) + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" +#include +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" +#include + +WINE_DEFAULT_DEBUG_CHANNEL(winscard); + +static HMODULE WINSCARD_hModule; + +const SCARD_IO_REQUEST g_rgSCardT0Pci = { SCARD_PROTOCOL_T0, 8 }; +const SCARD_IO_REQUEST g_rgSCardT1Pci = { SCARD_PROTOCOL_T1, 8 }; +const SCARD_IO_REQUEST g_rgSCardRawPci = { SCARD_PROTOCOL_RAW, 8 }; + + +BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved); + + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + { + DisableThreadLibraryCalls(hinstDLL); + WINSCARD_hModule = hinstDLL; + break; + } + case DLL_PROCESS_DETACH: + break; + } + + return TRUE; +} diff --git a/dlls/winscard/winscard.spec b/dlls/winscard/winscard.spec new file mode 100644 index 00000000000..6dd83d8a80e --- /dev/null +++ b/dlls/winscard/winscard.spec @@ -0,0 +1,63 @@ +@ stub ClassInstall32 +@ stub SCardAccessNewReaderEvent +@ stub SCardReleaseAllEvents +@ stub SCardReleaseNewReaderEvent +@ stub SCardAccessStartedEvent +@ stub SCardAddReaderToGroupA +@ stub SCardAddReaderToGroupW +@ stub SCardBeginTransaction +@ stub SCardCancel +@ stub SCardConnectA +@ stub SCardConnectW +@ stub SCardControl +@ stub SCardDisconnect +@ stub SCardEndTransaction +@ stub SCardEstablishContext +@ stub SCardForgetCardTypeA +@ stub SCardForgetCardTypeW +@ stub SCardForgetReaderA +@ stub SCardForgetReaderGroupA +@ stub SCardForgetReaderGroupW +@ stub SCardForgetReaderW +@ stub SCardFreeMemory +@ stub SCardGetAttrib +@ stub SCardGetCardTypeProviderNameA +@ stub SCardGetCardTypeProviderNameW +@ stub SCardGetProviderIdA +@ stub SCardGetProviderIdW +@ stub SCardGetStatusChangeA +@ stub SCardGetStatusChangeW +@ stub SCardIntroduceCardTypeA +@ stub SCardIntroduceCardTypeW +@ stub SCardIntroduceReaderA +@ stub SCardIntroduceReaderGroupA +@ stub SCardIntroduceReaderGroupW +@ stub SCardIntroduceReaderW +@ stub SCardIsValidContext +@ stub SCardListCardsA +@ stub SCardListCardsW +@ stub SCardListInterfacesA +@ stub SCardListInterfacesW +@ stub SCardListReaderGroupsA +@ stub SCardListReaderGroupsW +@ stub SCardListReadersA +@ stub SCardListReadersW +@ stub SCardLocateCardsA +@ stub SCardLocateCardsByATRA +@ stub SCardLocateCardsByATRW +@ stub SCardLocateCardsW +@ stub SCardReconnect +@ stub SCardReleaseContext +@ stub SCardReleaseStartedEvent +@ stub SCardRemoveReaderFromGroupA +@ stub SCardRemoveReaderFromGroupW +@ stub SCardSetAttrib +@ stub SCardSetCardTypeProviderNameA +@ stub SCardSetCardTypeProviderNameW +@ stub SCardState +@ stub SCardStatusA +@ stub SCardStatusW +@ stub SCardTransmit +@ extern g_rgSCardRawPci +@ extern g_rgSCardT0Pci +@ extern g_rgSCardT1Pci