Resources | Resources |



Class resolution in Brew MP

When an application calls IShell_CreateInstance() or IEnv_CreateInstance() in instantiate an instance of a class, the specified ClassID must be resolved to the appropriate class. The following diagram illustrates an example of class resolution in Brew MP.

Class Caller of the class
  • The module's MIF (foo.mif) lists the supported ClassIDs and class system privileges.

    The system populates the ClassID to the module (foo.mod) table upon startup.

  • foo.mod contains the implementation (the classes) of the IFoo interface defined in AEEFoo.h.
  • Includes AEEFoo.h, which defines the interface and can be used to invoke the functions exposed by the interface.
  • Requests the class that implements the IFoo interface by invoking CreateInstance with the ClassID of the class.

    The system resolves the class, locates the module that contains the class (foo.mod), loads the module, and instantiates the class, and the pointer to the instance of the class is returned to the caller.