Can I use GetProcAdress
to check which dll function is used in my process?
I want to detect a specific function from a running dll in my process.
GetProcAddress(GetModuleHandle(TEXT("any.dll")), "AnyFunction");
If it returned not null, I can say this function used?
GetProcAddress
is actually checking if a specific function is exported in a specific DLL.
I guess what you want is to check if a specific function is imported in a specific DLL, AFAIK there is no API can do that, you have to manually parse the PE data yourself to get what you want.
Well, according to your new comment, you want to get which other DLLs are loaded through LoadLibrary
at runtime, right?
If so, parsing the PE data is no longer sufficient for your requirements, what you need is to hook the LoadLibrary
and GetProcAddress()
functions in your own process.