Adam Lock wrote:

> I am mulling over options for adding scripting to my plugin for hosting 
> ActiveX controls, so that JS can make calls directly onto methods on the 
> hosted control.
> 
> I want to be able to dynamically read the control's COM interface from 
> it's typelib and expose an equivalent interface in XPCOM.
> 
> Is this feasible?
> 
> I believe I can implement an object derived from the XPC stub class that 
> could marshal the interface calls back and forth but is it possible 
> generate the appropriate XPT at runtime for this interface? By this I 
> mean, can I build the XPT in memory and register them without copying 
> .xpt files into components/?

Adam,

I think you asked a similar question not too long ago.
Here is Mike Shaver's response:

"You'd have to do the XPConnect magic to get a factory object yourself (see 
mozJSComponentLoader.cpp), and the call RegisterFactory on the component manager. 
  No file references are used, no registry writing is performed."

-rick


Reply via email to