0

I've asked in this post how to enumerate the methods of a C++ dll l ibrary, and here I've found the solution P/Invoking the dbghelp.dll library.

My question is:

Using dbghelp.dll once I've got a method name, can I retrieve its overloads (if they exist) and its parameter types to know how I should call that method inside?

In this MSDN url are the functions documentation of the dbghelp.dll lib, but I'm not sure whether one of the functions could help me.

PS: My knowledges about PE are very low, that's why I'm asking a solution P/invoking other methods, but if is not possible using dbghelp.dll I would like to know the alternatives and the steps to accomplish the task.

Community
  • 1
  • 1
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417

1 Answers1

1

In general unmanaged libraries (ex: dll compiled from c++) is not possible. The PE format don't have a way to reverse engineering this info (this is one of the reason that dll and lib are distributed with .h files). Some reverse engineering tools analyze the prologue of functions and make guess and heuristics about their parameters but is only that, guesses. For C++ exported functions in libraries probably using the mangled names info could be retrieve this info. VC++ Name Mangling. But this is compiler implementation dependent info and could change anything any time.

In libraries of some managed languages (ex: .NET) that use only PE format as a container of their custom format (the PE only run and call .NET runtime that load the custom format), this info is saved has metadata information in the custom format.

NetVipeC
  • 4,402
  • 1
  • 17
  • 19