[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-smartcardsdk
Subject:    Missing SCard SDK Installation Files
From:       Gavin Norman <gavin_norman () AMDAHL ! COM>
Date:       1998-08-07 9:33:59
[Download RAW message or body]


I retrieved the Smart Card API and sample code provided via the
applications: SCBase.Exe, iBLDENV.Exe and iWINBASE.Exe, which I downloaded
from the Microsoft Website a few weeks ago.
On looking through the samples, I notice I am missing many header files such
as winscard.h.
Do you know of any other compressed files I need to download which contain
header files?

Also, I created a project using the ATL COM Object Wizard and tried to
#import the SCardDat.dll supplied from Microsoft as shown:
#import "SCardDat.dll" no_namespace, raw_interfaces_only

Unfortunately this line causes 47 type redefinition's including the 2 below:
SCardDat.tlh(24) : error C2011: '_LARGE_INTEGER' : 'union' type redefinition
SCardDat.tlh(25) : error C2011: '_ULARGE_INTEGER' : 'union' type
redefinition

Any Ideas?

cheers

G.L.Norman


-----Original Message-----
From: SmartCardSDK [mailto:SmartCardSDK@DISCUSS.MICROSOFT.COM]On Behalf
Of Ellingsworth, Millard
Sent: 05 August 1998 17:17
To: SmartCardSDK@DISCUSS.MICROSOFT.COM
Subject: Re: AttachByReader(..) fails


I'm still going through all of this, so I'll share what I know so far.
Sorry for any repeated information.

Step 1: Make sure you follow the other instructions from the list to
make sure the correct files are installed.  See messages entitled "Re:
Error building the sampes for SC SDK", "Warnings while Building
Smartcard SDK .IDL Files", and "Smart Card SDK samples: problems and
workarounds".  The archive search works pretty well.

Step 2: At this point, make sure that after you restart your machine
that the Resource Manager is active.  My initial problems stemmed from a
SmartCard driver that wasn't putting itself in the right startup groups.
Attempting to run the resource manager by double clicking SCARDSVR.EXE
resulted in it refusing to load because it didn't think there were any
IFD drivers to attach to.  If it isn't running, you'll need to resolve
whatever problems exist with your IFD driver installation.

Step 3: Once the Resoure Manager will stay running, you can probably
find out the device's real name (I think it is usually a concatenation
of two [or more?] different strings returned by the driver) with the
following code (this is clipped from a test program, but should compile
and run):

#include <ostream.h>
#include <winscard.h>

int main ( int argc, char *argv[ ] )
{
        HRESULT hResult;
        SCARDCONTEXT hContext;

        hResult = SCardEstablishContext( SCARD_SCOPE_SYSTEM, NULL, NULL,
&hContext );
        unsigned long length;

        // with these parameters, it only returns the length of the list
text
        hResult = SCardListReaders(NULL, NULL, NULL, &length);

        // there's a bug in SCardListReaders documented elsewhere
        //   in the mailing list that is short changes the real length
        //   (probably only by 1 char, but what the heck)

        char *pzStr = new char[length + 10];
        hResult = SCardListReaders(NULL, NULL, pzStr, &length);

        if (SCARD_S_SUCCESS == hResult)
                cout << "Reader list is: " << pzStr << endl;
        else
                cout << "Could not successfully list readers." << endl;

        delete [] pzStr;
        hResult = SCardReleaseContext( hContext );
}

Step 4: After this works, pzStr will have the name you need to refer to
the adapter by from now on.  It will be longer than you think it should
be.  :-)  Without too much effort you can get the LLCOM sample to work
and actually see your reader show up in the SMARTCARD Common Dialog.

Once you get this far, you will start to feel pretty good about the
whole Smartcard thing.  Don't.  This is the "easy" part.  You'll
probably need to "introduce" your card to the system before it will show
up.  It just keeps getting more fun from there.

Hope that helps...Millard

-----Original Message-----
From: Grach, Yevgeniy [mailto:Yevgeniy.Grach@UNISYS.COM]
Sent: Tuesday, August 04, 1998 2:45 PM
To: SmartCardSDK@DISCUSS.MICROSOFT.COM
Subject: AttachByReader(..) fails


Hi,

My m_pISCard->AttachByReader(bstrIFDName, SHARED, T0) call fails.
I get error 0x80100009.
What could be wrong?
Is there any API call to get IFDname? Or is there any other way to get
it?
How can I make sure that my ICC Resource Manager knows the IFDname?
Do these questions make sense?

Thanks in advance,
Yevgeniy
Yevgeniy.Grach@unisys.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic