Name: | Module |
Version: | 1.0 |
ID: | ID_MODULE |
Status: | Stable |
Category: | System |
Include: | system/module.h |
Date: | May 2001 |
Author: | Rocklyte Systems |
Copyright: | Rocklyte Systems, 1996-2001. All rights reserved. |
The Module class is used to load and maintain the modules that are installed on the Pandora Engine system. A large number of modules are available in the Pandora Engine as standard, which you can use in the development of your programs. Examples of existing modules can be found in both the "system:modules/" and "system:classes/" directories.
If you want to load a module file for the purpose of utilising its functionality, you will need to create a Module object and initialise it. The following code segment illustrates:
struct Module *StringsMod; struct StringsBase *StringsBase; if (NewPrivateObject(ID_MODULE, NULL, &StringsMod) IS ERR_Okay) { SetField(StringsMod, FID_Name, FT_POINTER, "strings"); if (Action(AC_Init, StringsMod, NULL) IS ERR_Okay) { GetField(StringsMod, FID_ModBase, FT_POINTER, &StringsBase); } }
After a Module is initialised there is very little that you need to do with the object itself, besides reading the Modules's function base from the ModBase field. Keep in mind that you must not free the Module object until you are finished with the functions that it provides.
A list of officially recognised modules that export function tables can be found in the Module Index manual. If you would like to learn more about modules in general, refer to the Module Interfaces manual. If you would like to write a new module, please read the Module Development Guide.
The Module object consists of the following public fields:
ModBase The Module's function base (jump table) must be read from this field. Name The name of the module. TableType The type of function table that you want to acquire from the Module.
Field: | ModBase | |
Short: | The Module's function base (jump table) must be read from this field. | |
Type: | APTR | |
Status: | Read | |
|
Field: | TableType | |||||||
Short: | The type of function table that you want to acquire from the Module. | |||||||
Type: | LONG | |||||||
Status: | Read/Init | |||||||
|