I wrote an XPCOM component and an extension that uses it. XPCOM loads arbitrary DLL for its purposes.
How can I include XPCOM and DLL into XPI package?
From stackoverflow
-
XPI is basically a zip file, which includes the DLL, among other things See https://developer.mozilla.org/En/Creating_XPI_Installer_Modules
mojo : yes, but i can't find the way to load DLL from XPCOM. now i am struggling to get a path to extension directory to use in LoadLibrary call.Yarik : What is your environment? Win/UNix/Mac, Firefox/Thunderbird? THe paths to extension directories depend on that.mojo : I figure with IExtensionManager and IInstallLocation, you can neglect environment differences. -
I was able to find absolute path to my DLL via IExtensionManager and IInstallLocation, then load it via LoadLibrary().
- put DLL near XPCOM in my.xpi/components/
- figure out the path to extension via IExtensionManager and IInstallLocation
- LoadLibrary()
- profit
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.