issue with js-ctypes on win64

Talk about add-ons and extension development.
Post Reply
cyberscorpio
Posts: 1
Joined: August 23rd, 2006, 11:27 pm

issue with js-ctypes on win64

Post by cyberscorpio »

Hi, I met a problem.

My extension uses js-ctypes to get the system information by loading some system dlls (kernel.dll/psapi.dll/iphlapi.dll, etc). And I load these dll by:

Code: Select all

   var kernel32 = ctypes.open('kernel32.dll');
   var psapi = ctypes.open('psapi.dll');
   var iphlpapi = ctypes.open('iphlpapi.dll');

   // GlobalMemoryStatusEx
   var fnGlobalMemoryStatusEx = kernel32.declare('GlobalMemoryStatusEx',
         ctypes.winapi_abi,
         ctypes.uint32_t,
         MEMORYSTATUSEX.ptr);
        // etc...


I don't specify the path of the dll because I think the window API "LoadLibrary" will do it for me.

The extension works well on 32bits system, but users reported that in win64, the extension crashes firefox when it is open.

I don't have a win64 system for testing, so, is there anybody has met similar question, and give me some hint ?

My extension is here: https://addons.mozilla.org/en-US/firefo ... atusbarex/

Thank you in advance!

:-k
morat
Posts: 6422
Joined: February 3rd, 2009, 6:29 pm

Re: issue with js-ctypes on win64

Post by morat »

Read this:

viewtopic.php?p=10255979#p10255979

Does that comment mean that we need to use a different ABI constant on Win64?
Post Reply