I have a pointer to some object that was loaded from DLL using GetProcAddress:
CSomeClass* pSomeClass;
pSomeClass = (CSomeClass*)GetProcAddress(someDLLinstance, "SomeUnknownName");
I cannot modify the code above, but I need to obtain "SomeUnknownName"
string after it has gone out of scope. All I can access is pSomeClass
pointer. Is there any convenient way I can get the imported object's name from its pointer? Right now I just dump all the export names from DLL, then use GetProcAddress()
on each of them to get all pointers to all exported objects/functions, and then compare pSomeClass
to those pointers, but it appears to be very slow for a solution.