"Marcus G. Daniels" wrote:
> 
> >>>>> "JB" == John Bandhauer <[EMAIL PROTECTED]> writes:
> 
> JB> It should be of type nsQIResult - or some '[ptr] native' type that
> JB> you make up (see the nsQIResult declaration in nsrootidl.idl). The
> JB> issue is that by declaring it nsISupports you are saying that it
> JB> has a specific type - nsISupports - yet you also declare that its
> JB> type will be told at runtime by using iid_is. This confuses the
> JB> system.
> 
> This reminds me of something I bumped into recently.
> 
> Is there a way to return an iid to JavaScript? 

Declare an interface with an 'out' param of type nsIDPtr (or any
of the [nsid] types - see nsrootidl.idl). At runtime use
Components.interfaces.yourInterfaceName as the value to return.
If you need to return an iid that does not correspond to one of
the declared interfaces then use 'new Components.ID('{-numbers
here-}').

See: http://mozilla.org/scriptable/components_object.html#_ID

> Alternatively, is there
> some way to do a QueryInterface and return an unspecified interface?

I don't know what this means.

John.

Reply via email to