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
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, viny vincent.hardy.be@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
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 Wickline twickline@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, viny vincent.hardy.be@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...
Thanks, I was to lazy to search for it. :)
Tom
On Tue, Sep 28, 2010 at 7:56 PM, Jerome Leclanche adys.wh@gmail.com wrote:
The referenced discussion, in case anyone's curious: http://www.winehq.org/pipermail/wine-devel/2008-August/068462.html
J. Leclanche
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=detail&atid=410085&aid=31255...)
-- 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 Wicklinetwickline@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.be@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...
On 09/28/2010 06:46 AM, viny wrote:
Yes I started with this referenced discussion.
Here is a first patch. With it, Winscard can identify your smartcard reader.
g_pcscliteHandle = wine_dlopen("libpcsclite.so", RTLD_LAZY | RTLD_GLOBAL, error, sizeof(error));
You need to use configure to get the so name of the library.
+LONG WINAPI SCardListReadersA(SCARDCONTEXT hContext, LPCSTR mszGroups, LPSTR mszReaders, LPDWORD pcchReaders) +{
- LONG retval;
- LPSTR *pmszReaders;
- LPSTR szList = NULL;
- DWORD ListLength = 0;
- TRACE(" 0x%08X %p %p %p\n", (unsigned int) hContext, mszGroups, mszReaders, pcchReaders);
If you want to print a pointer, print it as a pointer, don't convert it into int. It's not correct for 64-bit Wine.
+LONG WINAPI SCardListReadersA(SCARDCONTEXT hContext, LPCSTR mszGroups, LPSTR mszReaders, LPDWORD pcchReaders) +{
- LONG retval;
- LPSTR *pmszReaders;
- LPSTR szList = NULL;
- DWORD ListLength = 0;
- TRACE(" 0x%08X %p %p %p\n", (unsigned int) hContext, mszGroups, mszReaders, pcchReaders);
- if (!pcchReaders)
retval = SCARD_E_INVALID_PARAMETER;
- else if (!pSCardListReaders)
retval = SCARD_F_INTERNAL_ERROR;
- else if (mszReaders && *pcchReaders == SCARD_AUTOALLOCATE)
- {
/* get list from pcsc-lite */
*pmszReaders = (LPSTR*) mszReaders;
You corrupting memory here. You haven't assigned any memory to pmszReaders. Did you mean to write "pmszReaders = (LPSTR) mszReaders;" ? In fact I don't see you using the assigned value at all.
Also you have some trailing spaces in your patch.
Vitaliy.
Vitaliy Margolen <wine-devel <at> kievinfo.com> writes:
/* get list from pcsc-lite */
*pmszReaders = (LPSTR*) mszReaders;
You corrupting memory here. You haven't assigned any memory to pmszReaders. Did you mean to write "pmszReaders = (LPSTR) mszReaders;" ? In fact I don't see you using the assigned value at all.
Also you have some trailing spaces in your patch.
Vitaliy.
Hi Vitaliy,
You are right : In my original patch , the line reads : /* get list from pcsc-lite */ LPSTR* pmszReaders = (LPSTR*) mszReaders;
Vincent changed that by declaring pmszReaders at the beginning but he left the star in front of pmszReaders in the affectation. In his version of the patch, this line should read : /* get list from pcsc-lite */ pmszReaders = (LPSTR*) mszReaders;
Innocent source code editing can introduce big bugs if not done (and tested) properly!
Cheers, -- Mounir IDRASSI IDRIX http://www.idrix.fr
viny <vincent.hardy.be <at> gmail.com> writes:
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 ?
Hi Vincent,
I'm the original author of the Winscard patch sent in 2007 and I see that the patch you have sent is just a subset of the code I originally posted. However, I don't see any credits to me or IDRIX in you submission.
I'm sure this is a honest omission and I hope that it will be corrected in future patches.
Just for the record, I provide since 2007 a 32bit Linux binary of winscard.so.dll that have full PC/SC support. Last Tests conducted two weeks ago against Wine 1.3.1 and latest Linux ditros. Here is the link to it : http://www.idrix.fr/Root/SCard4Wine/winscard.tar.gz
In the coming days, I'll prepare an updated version of the 2007 patch that can be applied cleanly against the latest source tree.
That being said, I thank Vincent for his efforts in order to revive Wincard integration into Wine and I hope that it will finally succeed after more than three years of stagnation. Till now, most smart card users under Wine rely solely on the binary I provide or compiling their own using the original patch.
Cheers, -- Mounir IDRASSI IDRIX http://www.idrix.fr
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.idrassi@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
2010/9/29 viny vincent.hardy.be@gmail.com:
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.idrassi@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
what he meant was that on your patch you didn't credit them.
On 9/28/10 1:49 AM, viny wrote:
Hi all,
Is anyone working on winscard.dll ?
If not, may I propose patches ?
You might want to visit the Developer FAQ on the Wine Wiki at http://wiki.winehq.org/DeveloperFaq and then read through all of the Submitting Patches portion as well.
Good luck on submitting patches to Wine.
One rule, start small and with test cases to prove what you propose is what Windows does. No peeking at Windows internals and certainly not Windows code.
James McKenzie