Product Documentation

Knowledgebase

Previous Topic

Next Topic

Common Entry Point Functions

FairCom DB offers two calling methods for each function: the traditional FairCom DB call by function name in which each operation is called by a separate function, and the common entry point in which all functions are accessed through the ctree function. For example, AddKey() can be called in either of these two ways:

AddKey(keyno,target,recbyt,typadd);

ctree(FN_ADDKEY,keyno,target,&recbyt,NULL,NULL,typadd);

Either approach produces the same results, but some developers find the common entry point approach better suits their approach to programming.

If you are using FairCom DB, the client side of FairCom DB uses the common entry point approach to send the function calls to FairCom DB. The traditional functions are remapped to common entry point functions. If you use the common entry point function in your application, without any traditional functions, your program will not have to link in the remapping code, saving program memory.

Note: If the local library support is to be used in conjunction with common entry point, call ctree_loc() instead of ctree().

Note: When using common entry point with ctNOGLOBALS defined in ctoptn.h, call RegisterCtree() before initializing FairCom DB, (InitISAM(), etc.), because the global structure must be allocated before FairCom DB can be initialized. If this is not done, the application will hang or core dump on the initialization call.

In This Chapter

Forced Single Entry Point Capability

Extended Feature Parameter Blocks

Function Calls

TOCIndex