Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C#dll参数中的pythonnet_C#_Python 3.x_Dll_Python.net - Fatal编程技术网

C#dll参数中的pythonnet

C#dll参数中的pythonnet,c#,python-3.x,dll,python.net,C#,Python 3.x,Dll,Python.net,我使用的是python3.7和pythonnet版本:2.4.0,我使用的是C#dll,原型是 bool = Read(byte, byte, byte, ref byte[], ref string) 我使用ctypes,但它总是显示TypeError:没有方法匹配给定的Read参数 同样的代码可以在Python2.7和pythonnet2.0.0中运行 我应该在哪里修改,非常感谢 Read(0xB0, 0, 1, [], "") 我试过: data\u数组=ctypes.c\u字节*1

我使用的是python3.7和pythonnet版本:2.4.0,我使用的是C#dll,原型是

bool = Read(byte, byte, byte, ref byte[], ref string)
我使用ctypes,但它总是显示TypeError:没有方法匹配给定的Read参数 同样的代码可以在Python2.7和pythonnet2.0.0中运行 我应该在哪里修改,非常感谢

Read(0xB0, 0, 1, [], "")
我试过:

data\u数组=ctypes.c\u字节*1
读取(0xB0,0,1,数据_数组,“”)

data\u array=ctypes.pointer((ctypes.c_字节*1)()
读取(0xB0,0,1,数据_数组,“”)

但它仍然显示了TypeError:没有方法匹配我在下面尝试的Read的给定参数

导入clr
从系统导入*
从系统导入数组
从属地址=字节(0xB0)
数据地址=字节(0x21)
字节到读取=字节(0x02)
数据_数组=数组[字节]([0]*2)
脚本\视图=字符串(“”)
读取(从添加、数据添加、字节到读取、数据数组、脚本视图)