Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6387553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:09:57+00:00 2026-05-25T03:09:57+00:00

For communcation with a Smartcard I use the WINSCARD.DLL as an API to send

  • 0

For communcation with a Smartcard I use the WINSCARD.DLL as an API to send APDU commands to Smartcards. For a couple of cardreaders this is working as expected, but somehow I get an unkown return (it is not on http://msdn.microsoft.com/en-us/library/ms936965.aspx) value from the method SCardTransmit if I send the command to a O2Micro reader.

What is working:
If I send command (values in hex):

CLA: 00, INS: A4, P1: 02, P2: 04, Lc: 02, Data: "4401", Le: (not present)

I get the response SW1: 61. SW2: 1F

The response tells that there are 0x1F bytes available. So I send command:

CLA: 00, INS: A4, P1: 02, P2: 04, Lc: 02, Data: "4401", Le: 1F

But on that command I get no data and return value 0x57.

My question is if anyone knows what the return value 0x57 is telling and maybe a way how to solve or workaround it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:09:57+00:00Added an answer on May 25, 2026 at 3:09 am

    Your error code is one of the windows System Error Codes from winerror.h: ERROR_INVALID_PARAMETER. This almost always means that your APDUs are ok, but the SCardTransmit arguments are the problem. I recommend looking closely at the pbRecvBuffer parameter. Caveat: I’ve only used SCard functions with C++, not with C#.

    PC/SC functions can return standard windows error codes as well as PC/SC-specific error codes. Note the bit about the FormatMessage call: you can use that to make error reporting a little more generic with predefined error messages supplied by windows.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is in continuation with my previous post. communcation between racket program and python
I've got an Objective-C/cocoa based application that I'm working on. This app is client<->server.
Is the communication bi-directional in NServiceBus ? a subscriber can also publish/send message?
I am designing a library for my application, that wraps Windows smartcard subsystem. Physically,
Does all SMTP communication send emails between domains on port25? Is all communication unsecured?
My client-server communication looks like this: there are some so called annoucements which are
I'm developping a communication library based on NIO's non-blocking SocketChannels so I can use
i want a two communication between server and Android. From Android want to send
WCF is a general communication framework and the more you use it, the more
I use them for communication between different objects, as publisher and subscriber pattern. Is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.