Re: winscard stub dll
Hi Francois, Thanks for your modifications. I'll review your patch and submit it if I have no comments, ِCheers, Mounir IDRASSI IDRIX - Cryptography and IT Security Experts http://www.idrix.fr Francois Gouget wrote: > Hi, > > Here's a new version of the patch that removes the casts as suggested > by Alexandre. >
Re: winscard stub dll
Hi, Mounir IDRASSI wrote: Hi, Apart from Alexandre comment, I don't see any other possible changes. Here's a new version of the patch that removes the casts as suggested by Alexandre. -- Francois Gouget [EMAIL PROTECTED] commit 86fd1bdb35906c5601ff9b44ac2cbd6c35cdfbd9 Author: Francois Gouget <[EMAIL PROTECTED]> Date: Wed May 16 02:45:51 2007 +0200 winscard: Add a stub dll (initial implementation by Mounir IDRASSI, bugs by Francois Gouget). diff --git a/Makefile.in b/Makefile.in index 30e0581..eb5307f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -417,6 +417,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 \ @@ -763,6 +764,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 d322b0e..712a3be 100755 --- a/configure +++ b/configure @@ -20903,6 +20903,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" @@ -21872,6 +21874,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 52323c7..6ad89eb 100644 --- a/configure.ac +++ b/configure.ac @@ -1747,6 +1747,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 f9707e7..31f3ef8 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -205,6 +205,7 @@ BASEDIRS = \ wininet \ winmm \ winnls32 \ + winscard \ winspool.drv \ wintab32 \ wintrust \ @@ -571,6 +572,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) \ @@ -920,6 +922,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 000..9ce7ad6 --- /dev/null +++ b/dlls/winscard/Makefile.in @@ -0,0 +1,20 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR= @srcdir@ +VPATH = @srcdir@ +MODULE= winscard.dll +IMPORTLIB = libwinscard.$(IMPLIBEXT) +IMPORTS = kernel32 + +C_SRCS = \ + scarddb.c \ + scardcomm.c \ + scardtracking.c \ + winscard.c + +RC_SRCS = \ + rsrc.rc + [EMAIL PROTECTED]@ + [EMAIL PROTECTED]@ # 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 000..8226e9d --- /dev/null +++ b/dlls/winscard/rsrc.rc @@ -0,0 +1,33 @@ +/* + * Top level resource file for winscard.dll + * + * Copyright 2007 Mounir IDRASSI ([EMAIL PROTECTED], for IDRIX) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General
Re: winscard stub dll
Hi, Apart from Alexandre comment, I don't see any other possible changes. So, if the first patch containing the API headers is OK, I can submit the winscard stub patch. Mounir IDRASSI IDRIX - Cryptography and IT Security Experts http://www.idrix.fr Alexandre Julliard wrote: > Francois Gouget <[EMAIL PROTECTED]> writes: > > >> * I would really have liked to get rid of the (unsigneg int) casts, but >> as the handle types are ULONG_PTRs it seems like it won't be possible. >> That's quite annoying. If anyone has suggestions... >> > > ULONG_PTRs are longs, they should be printed with %lx without casts. > >
Re: winscard stub dll
Francois Gouget <[EMAIL PROTECTED]> writes: > But then on a 64bit system an __int64 should be the same as a long so > maybe it's ok anyway. Yes, __int64 is a long on Win64. > The only issue that could happen is if we try to compile Wine's dlls > on a 64bit Windows system using Visual C++. Isn't a long 32bit in > Visual C++? Is this a case we care about? No we don't really care, but anyway I don't think Visual C++ is smart enough to warn on printf formats. -- Alexandre Julliard [EMAIL PROTECTED]
Re: winscard stub dll
Alexandre Julliard wrote: Francois Gouget <[EMAIL PROTECTED]> writes: * I would really have liked to get rid of the (unsigneg int) casts, but as the handle types are ULONG_PTRs it seems like it won't be possible. That's quite annoying. If anyone has suggestions... ULONG_PTRs are longs, they should be printed with %lx without casts. On 32bit systems yes, but not on 64bit systems. From basetsd.h: #ifdef _WIN64 typedef unsigned __int64 ULONG_PTR, *PULONG_PTR; #else /* FIXME: defined(_WIN32) */ typedef unsigned long ULONG_PTR, *PULONG_PTR; #endif But then on a 64bit system an __int64 should be the same as a long so maybe it's ok anyway. The only issue that could happen is if we try to compile Wine's dlls on a 64bit Windows system using Visual C++. Isn't a long 32bit in Visual C++? Is this a case we care about? -- Francois Gouget [EMAIL PROTECTED]
Re: winscard stub dll
Francois Gouget <[EMAIL PROTECTED]> writes: > * I would really have liked to get rid of the (unsigneg int) casts, but > as the handle types are ULONG_PTRs it seems like it won't be possible. > That's quite annoying. If anyone has suggestions... ULONG_PTRs are longs, they should be printed with %lx without casts. -- Alexandre Julliard [EMAIL PROTECTED]
winscard stub dll
As I was working on the winscard headers, I also did small tweaks on the winscard stub implementation. I admit it's mostly whitespace changes: * removed unneeded #includes. They should be added back when the implementation actually requires them. * use LPCBYTE like in the headers instead of 'const BYTE*' * standardize the stub traces * use 4-space indentation for functions * I would really have liked to get rid of the (unsigneg int) casts, but as the handle types are ULONG_PTRs it seems like it won't be possible. That's quite annoying. If anyone has suggestions... So I'm posting it here for review and so Mounir IDRASSI gets a chance to tweak it further and submit it so he gets the credit (since it's his work much more then mine). Makefile.in |2 + configure |3 + configure.ac |1 + dlls/Makefile.in |5 + dlls/winscard/Makefile.in | 20 +++ dlls/winscard/rsrc.rc | 33 dlls/winscard/scardcomm.c | 133 + dlls/winscard/scarddb.c | 325 + dlls/winscard/scardtracking.c | 104 + dlls/winscard/winscard.c | 109 ++ dlls/winscard/winscard.spec | 66 + 11 files changed, 801 insertions(+), 0 deletions(-) diff --git a/Makefile.in b/Makefile.in index 30e0581..eb5307f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -417,6 +417,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 \ @@ -763,6 +764,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 d322b0e..712a3be 100755 --- a/configure +++ b/configure @@ -20903,6 +20903,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" @@ -21872,6 +21874,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 52323c7..6ad89eb 100644 --- a/configure.ac +++ b/configure.ac @@ -1747,6 +1747,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 f9707e7..31f3ef8 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -205,6 +205,7 @@ BASEDIRS = \ wininet \ winmm \ winnls32 \ + winscard \ winspool.drv \ wintab32 \ wintrust \ @@ -571,6 +572,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) \ @@ -920,6 +922,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.dr