What should I do to implement a hook-like system?
This is my setup:
I have these static libraries:
- A.lib
- B.lib
A and B are like modules that can be included together within a same application. The thing is I have a function in A that I want to expose to B. I was doing this with a callback list... but I'm not comfortable with this idea. So I think I can implement a hooking-like system, like Win32API has, but I want to hear an opinion from an expert.
Of course, I have access to both source-codes.
NOTE: I forgot to mention that I'm NOT using classes, and I can't create a class or object for this project, because of a design decision, so something like inheritance is not allowed here.