我有在 Delphi 中构建的 dll,我尝试从中调用函数。函数声明如下所示:
function GetUid(UID:Pointer):Integer; stdcall;
这相当于这个 C 函数签名:
int GetUID(void *pointer);
使用 ctypes 处理的库:
from ctypes import *
lib = cdll.LoadLibrary("mylib.dll")
但我卡在这里:
res = lib.GetUid(?)
我需要在这个函数中传递什么?指针是 void *,但是如何在 python 中正确地做到这一点?