1
大家好我正在編寫一個python腳本來訪問winscard.dll的windows。訪問winscard.dll的python腳本
lib = cdll.LoadLibrary('winscard.dll')
hSC = c_long(0)
lRetval = lib.SCardEstablishContext(0,None,None,pointer(hSC))
上述返回一個錯誤值如下
Traceback (most recent call last):
File "C:\Documents and Settings\sbritto\Desktop\OpenSSL\python\test.py",
line 17, in <module>
lRetval = lib.SCardEstablishContext(0,None,None,pointer(hSC))
ValueError: Procedure called with not enough arguments (16 bytes missing) or
wrong calling convention
在這種情況下的誤差值表示所述參數是錯誤的。但我不知道還有什麼可以作爲輸入來使它工作,我嘗試了幾種輸入組合。
謝謝大家。
我不知道這個原因。但[本](http://stackoverflow.com/questions/1458813/python-ctypes-and-not-enough-arguments-4-bytes-missing)和[this](http://stackoverflow.com/questions/ 5267434/python-ctypes-argument-errors)可能對你有些用處。希望能幫助到你。 –
非常希望看到這個工作... –