Get Signatures of Exported Functions in a Dll

DLL exported function signature

I know this question is old, but since I also had this problem and took me a while to fix, I'm answering it here.

First, as Harry Johnston said you should add __declspec(dllexport).
Second, if your project is a C++ project, you should add extern "C" too.
So, your method definition should look like this:

extern "C" __declspec(dllexport) void __stdcall NativeInjectionEntryPoint(REMOTE_ENTRY_INFO* InRemoteInfo)
{
// ...
}

Is there any native DLL export functions viewer?

you can use Dependency Walker to view the function name.
you can see the function's parameters only if it's decorated.
read the following from the FAQ:

How do I view the parameter and return types of a function?
For most functions, this information is simply not present in the module. The Windows' module file format only provides a single text string to identify each function. There is no structured way to list the number of parameters, the parameter types, or the return type. However, some languages do something called function "decoration" or "mangling", which is the process of encoding information into the text string. For example, a function like int Foo(int, int) encoded with simple decoration might be exported as _Foo@8. The 8 refers to the number of bytes used by the parameters. If C++ decoration is used, the function would be exported as ?Foo@@YGHHH@Z, which can be directly decoded back to the function's original prototype: int Foo(int, int). Dependency Walker supports C++ undecoration by using the Undecorate C++ Functions Command.



Related Topics



Leave a reply



Submit