In addition to the interfaces that are explicitly implemented by a NGWS class in the managed environment, the NGWS runtime supplies implementations of the following interfaces:
The class interface, which is generated by the runtime and not explicitly defined, is an interface that exposes all public interfaces, methods, properties, and fields that are explicitly exposed on the NGWS object. This interface is always a dual interface. The class interface receives the name of the NGWS class itself, preceded by an underscore. For example, for class MyClass, the class interface is named _MyClass.
For subclasses, the class interface also exposes all public interfaces, methods, properties, and fields on the base class. Additionally, the subclass exposes a class interface for each inherited class. For example, if class MyClass extends class MySuperclass, which itself extends Object, the NGWS object will expose to COM clients three class interfaces named _MyClass, _MySuperclass, and _Object.
For any interface that is explicitly implemented on the NGWS class itself, the COM client can obtain a pointer to a vtable. Other interfaces can obtain a pointer, too, depending on the interface type
Some NGWS classes also provide implementation of the following interfaces, as described in the following table:
Interface ID | Interface Description |
---|---|
IEnumVariant | For collection type classes, an interface for enumerating the objects in the collection if the class implements IEnumerable. |
IDispatchEx | If the class implements IExpando and performs late binding to objects, an extension of the IDispatch interface that, unlike IDispatch, allows for enumeration, addition, deletion, and case-sensitive calling of members. |
IConnectionPoint | For objects that support delegate-based events (an interface for registering event subscribers) and ICPC, but only if the class sources its events. |
For the most part, the COM client will get exactly the expected behavior from these COM interfaces. There are some special considerations to be aware of in using the class interface and overloaded methods on the NGWS object. The following topics discuss these considerations in detail: