MozillaZine

issue with js-ctypes on win64

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

Post Posted June 20th, 2011, 9:57 am

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: 3447
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 21st, 2011, 2:58 pm

Read this:

viewtopic.php?p=10255979#p10255979

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

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 4 guests