ctypes无法使用ctypes.open()加载dll文件 [英] ctypes is unable to load dll file using ctypes.open()
本文介绍了ctypes无法使用ctypes.open()加载dll文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此代码在我的计算机上正常工作,但是当我将其复制到具有所有先决条件的另一台计算机时,它停止在第5行:var lib = ctypes.open("C:\\ myapp \\ dl1.dll");
this code works properly on my machine but when i copy it to another machine with all its prerequisite it stops at line 5: var lib = ctypes.open("C:\\myapp\\dl1.dll");
function initport()
{
Components.utils.import("resource://gre/modules/ctypes.jsm");
var lib = ctypes.open("C:\\myapp\\dl1.dll");
var ans= lib.declare("initPort" , ctypes.stdcall_abi , ctypes.int8_t );
alert("MessageBox result : "+ans());
lib.close();
}
are there more requirements for JavaScript to load Dll?
推荐答案
0.dl1.dll
在哪里?如果它不在C:\\myapp\\
中,那么将找不到它.
1.您是否已在新计算机上注册dll?
0. Where is thedl1.dll
? If it''s not inC:\\myapp\\
then it won''t be found.
1. Have you registered the dll on the new machine?
这篇关于ctypes无法使用ctypes.open()加载dll文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文