Resources | Resources |



In-process class

In-process classes are non-applet classes that service the caller's request in the caller's process. Most Brew APIs are implemented as in-process classes. These classes use the permissions and quota limits of the caller to access resources.

In-process classes are usually contained in extensions in Brew MP, and can be thought of as code extensions for the caller. The in-process object is created inside the Env of the caller and its methods invoked by the caller result in direct function calls. The object shares the same privileges as the caller, and if created as a singleton, there exists only one instance of the class in the Env of the caller. See In-process class for more information on extensions. For more information on Env, see Environments.

In-process classes that provide QCM interfaces can be registered in the CIF/MIF using the Class primitive. See IShell and IEnv for more information on IShell-based classes, which are in-process classes with certain characteristics.

The following is an example of declaring an in-process class in CIF for a MOD1:

Class {
   classid = AEECLSID_MyClass,
   newfunc = MyClass_New,

  • MyClass_New is the constructor of the in-process class written in C/C++ code and is invoked when the class is instantiated by IShell_CreateInstance() or IEnv_CreateInstance() on AEECLSID_MyClass. The class is instantiated in the same process (or more accurately, the Env) of the caller.
  • newfunc is explicitly specified in CIF for MOD1 files. For MOD files, the constructor is set up by the helper files, e.g. AEEModGen.c.

For more information on CIF, see the Resource File and Markup Reference in on the Brew MP website.