|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
[Muscle] SCardEstablishContext question..
From: Naveen Mukkelli (Naveen
worldsmart.com.au)
Date: Mon Apr 04 2005 - 21:22:56 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I'm learning to write application for Smart cards using "winscard.h"
I've written the following code,
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<unistd.h>
#include<string.h>
#include<PCSC/winscard.h>
#include<PCSC/wintypes.h>
#include<pcsclite.h>
int main()
{
SCARDCONTEXT hContext;
LONG rv;
rv =
SCardEstablishContext(SCARD_SCOPE_SYSTEM,NULL,NULL,&hContext);
if( rv == SCARD_S_SUCCESS )
{
printf("Success\n");
}
else
{
printf("Failure\n");
}
return 0;
}
When I run this code, I'm getting "Failure" after couple of minutes. But
when I use "pcscd -f -d stdout" and insert the same card in the card
reader, it is working. What could be the problem?
Kindly let me know.
Cheers,
Naveen.
_______________________________________________
Muscle mailing list
Muscle
lists.musclecard.com
http://lists.drizzle.com/mailman/listinfo/muscle
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]