Suppose I have a function defined like this:
class Foo() {
public:
void bar(MyClass* p, int i, int j, CArray<CArray<int,int>,int> &a);
}
void Foo::bar(MyClass* p, int i, int j, CArray<CArray<int,int>,int> &a){
// Function body
}
For a Win32 application/DLL, that this function is not “exported” how can I be able to find the function address of bar, getting the function address of exported function was easy. However getting the function address of non-exported function is a bit hard.
It is not possible to do this in the general case.
Among other problems, if the function is not exported, then it may not exist. The optimizer may inline the function at every location where the function is called. If this occurs, the function won’t have an address because it won’t exist in the module.