Important: The information in this document is obsolete and should not be used for new development.
RegisterComponentResourceFile
TheRegisterComponentResourceFile
function registers all component resources in the given resource file according to the flags specified in theglobal
parameter.
FUNCTION RegisterComponentResourceFile (resRefNum: integer; global: integer): LongInt;
resRefNum
- The reference number of the resource file containing the components to register.
global
- A set of flags that control the scope of the registration of the components in the resource file specified in the
resRefNum
parameter. You can use these flags to specify a value for theglobal
parameter:registerCmpGlobal = 1;
Specify this flag to indicate that each component in the resource file should be made available to other applications and clients as well as the one performing the registration. If you do not specify this flag, each component is available for use only by the registering application or component (that is, the component is local to the A5 world of the registering program).registerCmpNoDuplicates = 2;
Specify this flag to indicate that if a component with identical characteristics to the one being registered already exists, then the new one should not be registered (RegisterComponentResourceFile
returns 0 in this situation). If you do not specify this flag, the component is registered even if a component with identical characteristics to the one being registered already exists.registerCompAfter = 4;
Specify this flag to indicate that asRegisterComponentResourceFile
registers a component, it should register the component after all
other components with the same component type. Usually components are registered before others with identical descriptions; specifying this flag overrides that behavior.DESCRIPTION
TheRegisterComponentResourceFile
function registers components in a resource file. If theRegisterComponentResourceFile
function successfully registers all components in the specified resource file,RegisterComponentResourceFile
returns a function result that indicates the number of components registered. If theRegisterComponentResourceFile
function could not register one or more of the components in the resource file or if the specified file reference number is invalid, it returns a negative function result.SEE ALSO
For a description of the format and content of component resources, see "Resources" beginning on page 6-77.