标签:ctypes
-
Python Load Windows库C#转换 - python
我有一个调用Windows dll(fbwflib.dll)的C#应用程序。从该dll调用的函数(FbwfIsFilterEnabled)需要通过引用传递两个参数。 在C#中,我的代码是: public class FBWF_Utilities { [DllImport("fbwflib.dll", SetLastError = tr […]
-
将ctypes类型的数组转换为void指针时出现numpy错误 - python
我想将字符串列表发送给C函数: from ctypes import c_double, c_void_p, Structure, cast, c_char_p, c_size_t, POINTER import numpy as np class FFIArray(Structure): """ Convert sequenc […]
-
NumPy结构化数组的结构数组:ndpointer的np.ctypeslib.as_array - python
我正在尝试调用一个C函数,该函数接受一个指向指针的指针,并将其重定向到内部分配的一维数组,沿该行: typedef myStruct { const char* name; int status; } myStruct; int foo(const myStruct** array, size_t* size); 我试图用Python和NumPy包装它,并获 […]
-
在ctypes中动态设置_fields_。 - python
阅读文档here,我发现您可以使用ctypes.Structure如下:- >>> class Int(Structure): ... _fields_ = [("first_16", c_int, 16), ... ("second_16", c_int, 16)] ... >>> pri […]