Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic


ctfiltercbAddFilter() initializes resources that are used when processing the filter. The function receives the parameters passed to the filter.


NINT ctfiltercbAddFilter(pTEXT libname, pTEXT funcname, pTEXT params,

pVOID libhandle, ppVOID pflthandle);


  • libname - the filter callback DLL name that was passed to SetDataFilter().
  • funcname - the filter callback function name that was passed to SetDataFilter().
  • params - the function parameter string that was passed to SetDataFilter().
  • libhandle - the application-defined library handle that was set by ctfiltercbLoadLib().
  • pflthandle - a pointer to an application-defined filter handle. ctfiltercbAddFilter() can allocate memory for use by the filter callback function and can return its address in this parameter.

For example, if the parameter string is:


then libname is “mycallback.dll”, funcname is “mycallback_function”, and params is “my_params”.

You can use c-tree API functions to open other c-tree files on that FairCom Server and you can read and write the files. All operations are done in the context of the database connection in which you called the record read operation that called the filter function.

Return Values


Symbolic Constant




Successful operation.

See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.



Example Code


See also

EvaluateFilter, LoadFilter, ctfiltercbRemoveFilter, UnloadFilter, SetDataFilter