1
안녕하세요, 저는 모두 Windows의 winscard.dll에 액세스하는 python 스크립트를 작성하고 있습니다.winscard.dll에 액세스하는 파이썬 스크립트
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
이 경우의 에러 값을 아래와 같이 값 오차 인자가 잘못이다. 하지만 작동하도록 입력으로 제공해야 할 다른 것을 모릅니다. 여러 입력 조합을 시도했습니다.
감사합니다.
lib = ctypes.WinDLL("winscard")
handle = ctypes.c_voidp()
lib.SCardEstablishConnection(0, None, None, ctypes.pointer(handle))
# returns 0, all is good
handle
# c_void_p(some address), handle got created
추신 :
나는이 원인에 대한 단서가 없습니다. 하지만 [이] (http://stackoverflow.com/questions/1458813/python-ctypes-and-not-enough-arguments-4-bytes-missing) 및 [this (http://stackoverflow.com/questions/) 5267434/python-ctypes-argument-errors) 아마 당신에게 유용 할 것입니다. 희망이 도움이됩니다. –
이 작업을보고 싶습니다 ... –