Hi Everyone,
We had already developed Firefox addon and it is currently working on 32bit Firefox browsers.
Now we need to support this addon on 64bit browsers as well.
Internally our addon , launches DLL ,using “ctypes.open”.
But before that we need to know, whether to launch 32bit /64bit version of dll.
So is there a way to detect whether our addon is running under 32bit or 64bit version of FF browser.
This OS variable is available by default in ChromeWoker’s, (i’m not sure about WebWorker’s). However if you need it in a non-woker scope, and it is not there by default (check first I’m not sure), then you can import it with -
Thanks @gloops for suggesting that I appreciate it! That method will only work on Windows though, and it requires a platform dependent system call, which is more expensive then using OS variable, which is no cost.
It can be useful to get the if the system is actually 64bit while the program is only 32bit, however its not useful in most cases. We just need to know if the process/program is 32bit, if it is, then we use all 32bit calls.
If you do need to know if the system is 64bit, there is a no cost XPCOM way to determine it, it’s available via Services.appinfo.