Re: winscard.dll

2010-09-29 Thread viny

However, I don't see any credits to me or IDRIX in you submission.


I don't understand Mounir : after patching, all wine Winscard sources 
files contain/keep this words :

Copyright 2007 Mounir IDRASSI  (mounir.idra...@idrix.fr, for IDRIX)


In the coming days, I'll prepare an updated version of the 2007 patch that can
be applied cleanly against the latest source tree.


OK , I'm waiting your new patch.

--
Vincent




winscard.dll

2010-09-28 Thread viny

Hi all,

Is anyone working on winscard.dll ?

If not, may I propose patches ?

I would like to have a working winscard.dll in wine.

--
Vincent





Re: winscard.dll

2010-09-28 Thread viny

Yes I started with this referenced discussion.

Here is a first patch. With it, Winscard can identify your smartcard reader.

Is it good enough to be sent to wine-patch ?

Here (http://www.linuxunderground.be/compteco/winscard_test.zip) a 
Windows test program that identifies your smartcard reader.


PS: don't use  versions 1.6.0 and 1.6.1 of pcsc-lite 
(https://alioth.debian.org/tracker/?func=detailatid=410085aid=312555group_id=30105)


--
Vincent

Le 28/09/2010 13:56, Jerome Leclanche a écrit :

The referenced discussion, in case anyone's curious:
http://www.winehq.org/pipermail/wine-devel/2008-August/068462.html


J. Leclanche



On Tue, Sep 28, 2010 at 12:43 PM, Tom Wicklinetwickl...@gmail.com  wrote:

Hello Vincent,

I don't believe anyone is working on winscard.dll at this time. You are more
then
welcome to work on it or any other part of Wine.

A couple years back their was a discussion about winscard.dll so you might
want to search through the wine-dev mailing list. Maybe those old
discussions
can be of some help.

Just some tips,

Make sure you use the same coding style that's already used.
Send as many test as you can.
Keep your patches small and clean.
Send patches here for review and to wine-patches for inclusion.


Welcome to the wonderful world of Wine!

Cheers,
Tom



On Tue, Sep 28, 2010 at 4:49 PM, vinyvincent.hardy...@gmail.com  wrote:


Hi all,

Is anyone working on winscard.dll ?

If not, may I propose patches ?

I would like to have a working winscard.dll in wine.

--
Vincent







--
Wine is not a conclusion but a process...








From 5cf45149ef8eb35f87c93a500938c7e55349796e Mon Sep 17 00:00:00 2001
From: Vincent Hardy vincent.hardy...@gmail.com
Date: Tue, 28 Sep 2010 13:02:06 +0200
Subject: [PATCH] First winscard patch
Windows test program :
www.linuxunderground.be/compteco/winscard_test.zip
(this program identifies your smartcard reader)
---
 dlls/winscard/winscard.c|  162 ---
 dlls/winscard/winscard.spec |2 +-
 include/winsmcrd.h  |2 +
 3 files changed, 156 insertions(+), 10 deletions(-)

diff --git a/dlls/winscard/winscard.c b/dlls/winscard/winscard.c
index bbf1d72..decc72c 100644
--- a/dlls/winscard/winscard.c
+++ b/dlls/winscard/winscard.c
@@ -17,16 +17,27 @@
  */
 
 #include config.h
+#include wine/port.h
 #include stdarg.h
 #include windef.h
 #include winbase.h
 #include wine/debug.h
+#include wine/library.h
 #include winscard.h
 #include winternl.h
 
+static BOOL PCSCLite_loadlib(void);
+static BOOL PCSCLite_loadfunctions(void);
+
 WINE_DEFAULT_DEBUG_CHANNEL(winscard);
 
+static LONG (*pSCardEstablishContext)(DWORD dwScope, LPCVOID pvReserved1, LPCVOID pvReserved2, LPSCARDCONTEXT phContext);
+static LONG (*pSCardIsValidContext)(SCARDCONTEXT hContext);
+static LONG (*pSCardReleaseContext)(SCARDCONTEXT hContext);
+static LONG (*pSCardListReaders)(SCARDCONTEXT hContext, LPCSTR mszGroups, LPSTR mszReaders, LPDWORD pcchReaders);
+
 static HMODULE WINSCARD_hModule;
+static void *g_pcscliteHandle = NULL;
 static HANDLE g_startedEvent = NULL;
 
 const SCARD_IO_REQUEST g_rgSCardT0Pci = { SCARD_PROTOCOL_T0, 8 };
@@ -44,6 +55,10 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 {
 DisableThreadLibraryCalls(hinstDLL);
 WINSCARD_hModule = hinstDLL;
+
+	if (PCSCLite_loadlib())
+	PCSCLite_loadfunctions();
+	
 /* FIXME: for now, we act as if the pcsc daemon is always started */
 g_startedEvent = CreateEventA(NULL,TRUE,TRUE,NULL);
 break;
@@ -51,6 +66,13 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 case DLL_PROCESS_DETACH:
 {
 CloseHandle(g_startedEvent);
+
+/* release PCSC-lite */
+if (g_pcscliteHandle)
+{  
+wine_dlclose(g_pcscliteHandle,NULL,0);  
+g_pcscliteHandle = NULL;   	
+}   
 break;
 }
 }
@@ -58,6 +80,62 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 return TRUE;
 }
 
+static BOOL PCSCLite_loadlib(void)
+{
+char error[256];
+
+if (g_pcscliteHandle)
+return TRUE; /*already loaded*/
+else
+{
+g_pcscliteHandle = wine_dlopen(libpcsclite.so, RTLD_LAZY | RTLD_GLOBAL, error, sizeof(error));
+if (g_pcscliteHandle)
+return TRUE;
+else
+{  
+WARN(Failed to open library libpcsclite.so : %s\n, error);
+return FALSE;
+}
+} 
+}  
+
+static BOOL PCSCLite_loadfunctions(void)
+{
+char error[256];
+
+#define LOAD_FUNC(name) \
+if ((p##name = wine_dlsym(g_pcscliteHandle,#name, error, sizeof(error) ))); \
+else WARN( Failed to load %s: %s\n, #name, error )
+
+LOAD_FUNC(SCardIsValidContext);
+LOAD_FUNC(SCardEstablishContext);
+LOAD_FUNC(SCardReleaseContext);
+

Re: winscard: add pcsc-lite helpers for upcoming(?) implementation

2009-11-13 Thread viny

joerg-cyril.hoe...@t-systems.com a écrit :

Hi,

looking for PCSC-card-reader support in Wine, I came across old mails from 2007.
http://www.winehq.org/pipermail/wine-devel/2007-May/057052.html

What's the current state of PCSC support in Wine? When I recently looked,
winscard seemed full of stubs.

OTOH, there's a company
http://www.starmoney.de/index.php?id=243
that seems to use Wine (and Darwine?) with card readers to make
its software available for Linux  Mac.  Also seems ~2007.

I believe that a winscard-PCSC-PCSC-Lite bridge would be much
easier to achieve than USB support in Wine.

Thanks for your help,
 Jörg Höhle




Hi,

There is a working binary winscard.dll for wine here :

http://www.idrix.fr/Root/SCard4Wine/winscard.tar.gz

But I'm waiting for official wine winscard too !





msxml3 bug 10802

2008-04-01 Thread viny
Hi,

When creating an xml file, wine shouldn't create header automatically. 
Is that difficult to fix this bug 
(http://bugs.winehq.org/show_bug.cgi?id=10802) ? I've looked at domdoc.c 
 but I'm not an expert...





my first patch

2007-10-26 Thread viny

Can someone tell me if this patch is correct for submitting to wine-patches.
I have generated this patch with git format-patch -o out origin

(related bug : http://bugs.winehq.org/show_bug.cgi?id=9805)
From c5eab13b67e6f24b3518dd77840f260dc101520e Mon Sep 17 00:00:00 2001
From: Vincent Hardy [EMAIL PROTECTED]
Date: Fri, 26 Oct 2007 13:37:39 +0200
Subject: [PATCH] Add TypeLib version for W2K, WXP, and Vista

---
 dlls/oleaut32/typelib16.c |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dlls/oleaut32/typelib16.c b/dlls/oleaut32/typelib16.c
index a010f7d..31bbf93 100644
--- a/dlls/oleaut32/typelib16.c
+++ b/dlls/oleaut32/typelib16.c
@@ -153,6 +153,9 @@ HRESULT WINAPI LoadTypeLib16(
  *| OLE 2.1   NT 1993-95  ?? ???
  *| OLE 2.3.1 W95 23 700
  *| OLE2 4.0  NT4SP6 1993-98  40 4277
+ *| OLE 2.1   W2K2000 10 3029
+ *| OLE 2.1   WXP2002 10 3029
+ *| OLE 2.1   Vista  2007 10 3029
  */
 DWORD WINAPI OaBuildVersion16(void)
 {
@@ -171,6 +174,12 @@ DWORD WINAPI OaBuildVersion16(void)
return MAKELONG(3024, 10); /* W98 SE */
 case 0x0004:  /* NT4 */
return MAKELONG(4277, 40); /* NT4 SP6 */
+case 0x0005:  /* W2K */
+   return MAKELONG(3029, 10); /* W2K SP4 */
+case 0x0105:  /* WXP */
+   return MAKELONG(3029, 10); /* WXP SP2 */
+case 0x0006:  /* Vista */
+   return MAKELONG(3029, 10); /* Vista */
 default:
FIXME(Version value not known yet. Please investigate it!\n);
return 0;
-- 
1.5.2.5




Delphi Toolbar Icons not displayed correctly

2006-12-12 Thread viny

Here http://home.scarlet.be/linux/compteco/test.zip , a little test
program (with delphi 5 sources) that demonstrate a wrong display of the
toolbar. With native comctl32, it's OK, but not with the builtin one.

I would like to run this program
(http://home.scarlet.be/linux/compteco/index.html) without native DLL.

Thanks.