NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Accessing a COM Object that has no Type Library

For COM classes that have no type library, the NGWS client can create an instance of System.Type and obtain an instance of the COM object by calling the Type.GetTypeFromProgID method, followed by a call to Type.CreateInstance. These calls will load the appropriate class factory and create an instance of the __COMObject class.

__ComObject, an internal class in the System namespace, is derived from MarshalByRefObject. __ComObject is the root class for all COM wrappers, which wrap COM objects accessed from the NGWS runtime. This class defines only the basics, and exists solely to make COM classes with no type library available to NGWS clients. In this case, the client calls methods on the COM server through the Type object’s InvokeMember method, which takes as arguments a method name, object name, and argument string.