Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#15 SCardGetStatusChange not blocking

open
5
2012-02-08
2012-02-08
Antoine Marot
No

While everything works fine on OSX Lion, I have trouble running my code on Win7.

Basically, the problem is that a call to SCardGetStatusChange(hcontext, INFINITE, newstates) does not wait for changes in Win7. The state that is returned has the SCARD_STATE_CHANGED flag activated, but it has *not* changed (ie. no flags have been changed).

When I inspect the integer value of my state, I remark that this value is probably too big (e.g., 1114146, 1115170, ...). Moreover, that value keeps growing when the program runs.

Is this behavior caused by 32 vs 64 bits issues ? Can I force my program to use 32 bits versions of DLLs ?

Thanks for your help,
Antoine

Discussion

  • What version of pyscard are you using?

    Can you send a short sample code exhibiting the bug?

     
  • Antoine Marot
    Antoine Marot
    2012-02-08

    Sample code

     
    Attachments
  • Antoine Marot
    Antoine Marot
    2012-02-08

    Output of bug.py

     
    Attachments
  • Antoine Marot
    Antoine Marot
    2012-02-08

    I'm using version 1.6.12.

    I attached two files: bug.py which exhibits the bug, and output.txt which is the output I get when inserting/removing the card.

    As you will see, the numeric value of the state keeps growing. Also, note the last two entries printed on the output, they are identical.

     
  • I do not use Windows myself.
    Jean-Daniel will have to look at this issue.