Jon, You could use nsIClassInfo (for components that support it) to retrieve the list of interface IDs for a given instance.
There's a global getter for nsIInterfaceInfoManager in xptinfo.h which has the GetInfoForIID() and GetInfoForName() methods. In fact, looks like all kinds of XP typeinfo definitions are in xptinfo.h. Good luck, Rick
