FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour winscard.lib smartcard
Posts: 58
Joined: Thu Oct 13, 2005 01:26 PM
winscard.lib smartcard
Posted: Sun Oct 07, 2012 10:42 PM

Hi,
i need help about the smatcard

i write this function and work fine

but i need the function for read and write

thanks

HB_FUNC( PCSC_NAME )
{
LONG rv;
SCARDCONTEXT hContext;
LPTSTR mszReaders;
SCARDHANDLE hCard;
DWORD dwReaders, dwActiveProtocol, dwRecvLength;

rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);

#ifdef SCARD_AUTOALLOCATE
dwReaders = SCARD_AUTOALLOCATE;
rv = SCardListReaders(hContext, NULL, (LPTSTR)&mszReaders, &dwReaders);
#else
rv = SCardListReaders(hContext, NULL, NULL, &dwReaders);
mszReaders = calloc(dwReaders, sizeof(char));
rv = SCardListReaders(hContext, NULL, mszReaders, &dwReaders);
#endif

if (SCARD_S_SUCCESS != rv)
{
hb_retc( "noPCSC" );
}

if (SCARD_S_SUCCESS == rv)
{
hb_retc( mszReaders );
}

rv = SCardReleaseContext(hContext);

}

Posts: 10
Joined: Tue Jun 28, 2011 08:26 PM
Re: winscard.lib smartcard
Posted: Fri Oct 03, 2014 07:12 AM

Hi,

Any solution to this problem?

I need to read some card (smartcard, proximity smartcard or some thing like that) and i'm trying to use this library but i can't find any example.

If it's possible to do this with other library or function I would be grateful if you could teach me.

Thanks in advance.

Continue the discussion