Python で DLL 関数を使用する際に問題があります。「dumpbin」の字で関数名を調べてみました。
例えば
_xGraphics3D@20
私はこのような関数を呼び出そうとしました:
from ctypes import *
xorsLib = cdll.LoadLibrary("Xors3D.dll")
width = c_int(800)
height = c_int(600)
depth = c_int(32)
mode = c_int(0)
vsync = c_int(0)
xGraphics3D = getattr(xorsLib,"_xGraphics3D@20")
xGraphics3D(width, height, depth, mode, vsync)
しかし、それはエラーの原因です:
Traceback (most recent call last):
File "D:/Coding/Python/pyASG/main", line 11, in <module>
xGraphics3D(width, height, depth, mode, vsync)
ValueError: Procedure called with not enough arguments (20 bytes missing) or wrong calling convention
私は何を間違っていますか?
ps私はpythonを知りませんが、私はそれを学びます。ctype-manual を読み、答えを見つけようとしました...
pps私のひどい英語でごめんなさい。