|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Eric Perlin (ericperl
WINDOWS.MICROSOFT.COM)Date: Thu May 23 2002 - 17:10:19 CDT
An error is a little vague. Can you be more precise?
If you get SCW_E_BUFFERTOOSMALL, it means that your hardcoded 20 is too
small.
The solution manager is one of the essential components of the Windows
SmartCard Toolkit.
When you build a solution (.scw), you can give a friendly name to your
card and personalize the ATR.
No registration can be done by default because it is configurable.
By the way, registration for memory card is useless as far as I know.
The solution manager produces a reg file that you can merge, containing
the ATR (& Mask) and the friendly name. That's what the SC subsystem
needs to give you a friendly name for an ATR.
Alternatively you can supply the info in the reg file to
SCardIntroduceCardType.
The pbAtrMask is not optional. With WfSC, provide an array of the same
size as the ATR filled with 0xFF.
If card operations can modify the ATR (/T0 file), you may need to
revisit this.
Eric Perlin [MS]
-----Original Message-----
From: Catalin Untea [mailto:ucm040
YAHOO.COM]
Sent: Thursday, May 23, 2002 1:11 PM
To: SmartCardSDK
DISCUSS.MICROSOFT.COM
Subject: Re: PC/SC Connection Followed by API Calls
I've followed the same steps as your number 1/, but I still receive an
error when I call hScwEnumFile(). What I'm doing wrong? I have the
following code:
lReturn = SCardConnect( hSC, "TOWITOKO CHIPDRIVE 0", SCARD_SHARE_DIRECT,
SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1, &hCardHandle, &dwAP);
.......
scode=hScwAttachToCard(hCardHandle, NULL, &hCard4Proxy);
.......
WCHAR wsFileName[20]; // Receive a file name
UINT16 nFileCookie=0; // Pass 0 as the cookie value to the first call
do {
scode = hScwEnumFile(hCard4Proxy, L"/s/k", &nFileCookie, wsFileName,
sizeof (wsFileName) / sizeof(WCHAR));
} while (scode==SCW_S_OK)
About the secondary option, could you tell me more about this solution
manager? Until now I used the ScardIntroduceCardType() function, but
only for memory cards (I suppose that this type of smart card - Windows
Powered Smart Card - is already added in the smart card database). Is
the pbAtrMask optional? (Because I couldn't introduce a new card to the
smart card subsystem, unless I supply this parameter.)
Many Thanks,
Catalin
Eric Perlin <ericperl
WINDOWS.MICROSOFT.COM> wrote: You can only use
NULL_TX_NAME if you supply an hCard. Note that NULL_TX_NAME implies that
the hCard was acquired for the simulator (scwwinscard).
If you want to connect to a real card, either:
1/ Get a hCard using PC/SC function and call hScwAttachToCard(hCard,
NULL, &hScwHandle) 2/ Register the card name (a .reg file is produced by
the solution
manager) and call hScwAttachToCard(NULL, L"name here>\0", &hScwHandle).
You can specify multiple names because this parameter is a multistring.
Eric Perlin [MS]
-----Original Message-----
From: Catalin Untea [mailto:ucm040
YAHOO.COM]
Sent: Thursday, May 23, 2002 6:55 AM
To: SmartCardSDK
DISCUSS.MICROSOFT.COM
Subject: PC/SC Connection Followed by API Calls
Hello.
Does anybody know how should I use the mszCardNames parameter in the
hScwAttachToCard call (PC/SC Connection Followed by API Calls)? If I'll
use NULL_TX_NAME I will receive the following error
:SCW_E_BUFFERTOOSMALL. I was thinking to use the ATR string for this
parameter. If I'll use the NULL value, I won't receive an error but
afterwards at hScwEnumFile call I will receive error hex: 80000080.
Should I use the hScwSetTransmitCallback function before calling
hScwEnumFile?
I am using a Towitoko Chipdrive 110 and Windows Powered Smart Cards
(Sagem).
Thanks to all in advance.
Catalin
---------------------------------
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
---------------------------------
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]