ctfiltercbAddFilter() initializes resources that are used when processing the filter. The function receives the parameters passed to the filter.
Declaration
NINT ctfiltercbAddFilter(pTEXT libname, pTEXT funcname, pTEXT params,
pVOID libhandle, ppVOID pflthandle);Description
- 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:
@#mycallback.dll#mycallback_function#my_paramsthen 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
| Value | Symbolic Constant | Explanation |
|---|---|---|
| 0 | CTDBRET_OK | Successful operation. |
See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.
Example
/*
Example Code
*/
See also
EvaluateFilter, LoadFilter, ctfiltercbRemoveFilter, UnloadFilter, SetDataFilter