Skip to content

Commit

Permalink
Use correct pragma in the 64-bit case
Browse files Browse the repository at this point in the history
  • Loading branch information
Tor Lillqvist committed Oct 3, 2018
1 parent f742833 commit e7ce4ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions injecteddll/injecteddll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,11 @@ static bool hook(bool bMandatory, ThreadProcParam* pParam, const wchar_t* sModul
extern "C" DWORD WINAPI InjectedDllMainFunction(ThreadProcParam* pParam)
{
// Magic to export this function using a plain undecorated name despite it being WINAPI
#ifdef _WIN64
#pragma comment(linker, "/EXPORT:InjectedDllMainFunction=InjectedDllMainFunction")
#else
#pragma comment(linker, "/EXPORT:InjectedDllMainFunction=_InjectedDllMainFunction@4")
#endif

if (pParam->mnSize != sizeof(*pParam))
{
Expand Down

0 comments on commit e7ce4ab

Please sign in to comment.