我想调用一个dll中的函数,dll成功载入,但是调用函数传递参数过程中遇到一些问题
这个是C函数:
#define CV_DETECT_ENABLE_ALIGN_106 0x0000020
typedef void *cv_handle_t;
CV_SDK_API
cv_result_t
cv_face_create_detector(
cv_handle_t *handle,
const char *modle_path,
unsigned int config
);
在python中我这样调用:
CV_DETECT_ENABLE_ALIGN_106 = 0x00000020
cv_face_create_detector = dll.cv_face_create_detector
cv_face_create_detector.restype = c_int
cv_face_create_detector.argtypes = (POINTER(c_void_p), c_char_p, c_uint)
a = c_void_p(0)
handle_detect = byref(a)
result = cv_face_create_detector(handle_detect, None, CV_DETECT_ENABLE_ALIGN_106)
print(result)
错误提示:
result = cv_face_create_detector(handle_detect, None, CV_DETECT_ENABLE_ALIGN_106)
OSError: [WinError -529697949] Windows Error 0xe06d7363
请问是哪个参数传递或者声明错了,导致函数调用失败了呢,先谢谢了