| #pragma once |
| |
| // ----------------------------------------------------------------------------- |
| // extern "C" interface designed for users who dlopen the interceptor-lib |
| // instead of linking against it. The API for these functions using C structures |
| // only to support users compiled with different STL library. |
| // ----------------------------------------------------------------------------- |
| |
| extern "C" { |
| |
| void *InitializeInterceptor(); |
| |
| void TerminateInterceptor(void *interceptor); |
| |
| void *FindFunctionByName(void *interceptor, const char *symbol_name); |
| |
| bool InterceptFunction(void *interceptor, void *old_function, |
| void *new_function, void **callback_function, |
| void (*error_callback)(void *, const char *) = nullptr, |
| void *error_callback_baton = nullptr); |
| |
| bool InterceptSymbol(void *interceptor, const char *symbol_name, |
| void *new_function, void **callback_function, |
| void (*error_callback)(void *, const char *) = nullptr, |
| void *error_callback_baton = nullptr); |
| |
| } // extern "C" |