문제

I am new to smart card development. What I am trying to do is,
1>get the name of the card reader.
2>connect to the card in the card reader.
3>change the admin key of the card using c# .

for the first point i used winscard.DLL- function SCardListReaders. It worked well.
now for next step, I tried with function -SCardConnect of winscard.dll.

but when ever i am running this , it returns "6", but it should return 0. I am really confused.
Any idea, what that means? where i am doing wrong?
Please help.
Thank you in advance.

도움이 되었습니까?

해결책

You can refer here for smart card return values. And if not listed, you can refer here for system error codes.

The error code 6 is ERROR_INVALID_HANDLE. Try to check your OS (32-bit or 64-bit) and your smart card driver (32-bit or 64-bit). Ensure that they are the same. Also, check that your codes are using the correct variable type.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top