这个dll能不能再火山调用
本帖最后由 肉丝 于 2025-3-5 15:57 编辑def __init__(self):
self.js_run_time = ctypes.CDLL(r'D:\PythonV8-Ricky\ExportPythonV8DLL.dll')
self.js_run_time.run_script.argtypes =
self.js_run_time.run_script.restype = ctypes.c_void_p
self.js_run_time.free_result.argtypes =
def run_script(self, source, fun_name):
result_ptr = self.js_run_time.run_script(source.encode('utf-8'), fun_name.encode('utf-8'))
result = ctypes.string_at(result_ptr).decode('utf-8')
self.js_run_time.free_result(result_ptr)
return result
来源https://bbs.125.la/forum.php?mod=viewthread&tid=14848368
//我这个报错<火山程序 类型 = "通常" 版本 = 1 />方法 run_script <公开 静态 类型 = 变整数 @视窗.输入 = "..\\..\\ExportPythonV8DLL.dll" @输出名 = "run_script">参数 script <类型 = 变整数>参数 function <类型 = 变整数>{}
已自行解决
页:
[1]