This interface of the com.ms.com package enables a class factory object in any kind of server to control object creation through licensing. This extension to IClassFactory enables a class factory executing on a licensed machine to provide a license key that can be used later to create an object instance on an unlicensed machine. Such considerations are important for objects like controls that are used to build applications on a licensed machine. Subsequently, the application built must be able to run on an unlicensed machine. The license key gives only that one client application the right to create objects through IClassFactory2 when a full machine license does not exist.
public interface IClassFactory2 extends IClassFactory { // Methods public IUnknown CreateInstance(IUnknown pUnkOuter, _Guid riid); public IUnknown CreateInstanceLic(IUnknown pUnkOuter, IUnknown pUnkReserved, _Guid riid, String bstrKey); public LICINFO GetLicInfo(); public void LockServer(boolean fLock); public String RequestLicKey(int dwReserved); }