Click here to Skip to main content
15,889,858 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
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?
Posted
Comments
Sandeep Mewara 31-Mar-11 6:40am    
No errors?

BTW, sure, the permission to browse that folder is provided?
01.mandar 5-Apr-11 8:04am    
it runs on my machine without any error.
i have also made the folder RW form root of C:
i am running windows 7 with minimal security now when i port my code to second machine ie.windows XP which doesn't have security as compared to win 7 so i think security may not be causing any problem.
browser part :
i have reduced security in IE too.. (may be i need to change more option in IE which i don't know ) :)


1 solution

0. Where is the dl1.dll? If it's not in C:\\myapp\\ then it won't be found.
1. Have you registered the dll on the new machine?
 
Share this answer
 
Comments
01.mandar 5-Apr-11 8:07am    
i have placed my dll in same folder as above (even tried with sys folders)

i don't know how to register dll on new machine (is it REGSVR kinda..)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900