ThalesGroup / pycryptoki

Python interface to SafeNet's PKCS11 library implementation
Apache License 2.0
58 stars 22 forks source link

Use CDLL to open 32 bit library access on Windows #2

Closed astraw38 closed 7 years ago

astraw38 commented 7 years ago

The 32 bit library uses different calling convention (64b the calling conventions are the same), so using WinDLL to open the cryptoki.dll will fail with the following error:

>>> dll.C_Initialize(ctypes.c_void_p())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Procedure probably called with too many arguments (4 bytes in excess)