>>>>> "JB" == John Bandhauer <[EMAIL PROTECTED]> writes:

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

JB> I don't know what this means.

Ok, QI is declared like this:

  void QueryInterface(in nsIIDRef uuid, 
                      [iid_is(uuid),retval] out nsQIResult result);

Is it true that XPConnect uses the `iid_is(uuid)' so that it knows
what kind of object is coming back?  Are dynamically-typed runtimes
the (only) reason for this?

Suppose you wanted to have a:

  void QuerySomething (out nsQIResult result);

where that method picked from, say, a static list of iids in an array.
(For the sake of argument, say that there was contract such that the
returned value would never be used to call a method until that value
was returned to a place where the interface was once again possible to
know by other means.)

This is impossible, right?

Reply via email to