0

The easyhook.h header file has this function declaration.

typedef void __stdcall REMOTE_ENTRY_POINT(REMOTE_ENTRY_INFO* InRemoteInfo);

The easyhook creator stated this:

Your injected native DLL must have a REMOTE_ENTRY_POINT exported as "NativeInjectionEntryPoint". Take a look at easyhook.h for the signature of that export.

Assuming my dll already looks like this:

void __stdcall NativeInjectionEntryPoint(REMOTE_ENTRY_INFO* InRemoteInfo);

INT WINAPI DllMain(HMODULE hDLL, DWORD Reason, LPVOID Reserved){    
    switch(Reason){
    case DLL_PROCESS_ATTACH:
    case DLL_PROCESS_DETACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
        break;
    }
    return TRUE;
}

void _stdcall NativeInjectionEntryPoint(REMOTE_ENTRY_INFO* InRemoteInfo)(){

}

What is my dll supposed to look like?

For feedback, I'd like to know if I've stated the question clearly enough to be answered. My last one was voted down and I don't know why.

Any help will be appreciated.

Lfod
  • 581
  • 5
  • 14
  • If you haven't already, you'll need to export the NativeInjectionEntryPoint() function, either using `__declspec(dllexport)` or by using a definition file. – Harry Johnston Jun 18 '14 at 02:02
  • Harry, I really wish I knew what that meant doing so I'm searching how to do it right now. Could you please possible just replace the code I've posted with the right one? – Lfod Jun 18 '14 at 02:46

1 Answers1

2

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)
{
    // ...
}
ShayanOH
  • 132
  • 1
  • 10