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?
I was able to find absolute path to my DLL via IExtensionManager and IInstallLocation, then load it via LoadLibrary().