I found this code for injecting dll files and call functions from them. I got an exe and the source code. The exe is working but when i try to compile the source code i get this error:
LoadDll.cpp: In Funktion »bool ExecuteRemoteThread(HANDLE, BOOL, BOOL, wchar_t*, wchar_t*)«:
LoadDll.cpp:313:62: Fehler: ungültige Umwandlung von »DWORD (__attribute__((__stdcall__)) *)(RemoteThreadBlock*) {aka long unsigned int (__attribute__((__stdcall__)) *)(RemoteThreadBlock*)}« in »LPCVOID {aka const void*}« [-fpermissive]
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/windows.h:50:0,
from LoadDll.cpp:16:
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/winbase.h:2215:24: Fehler: Argument 3 von »BOOL WriteProcessMemory(HANDLE, LPVOID, LPCVOID, SIZE_T, SIZE_T*)« wird initialisiert [-fpermissive]
The source code can be found at: https://pastebin.com/AuZpy57U
It seems like the error is in line 313
if ( ! WriteProcessMemory( hProcess, p, &RemoteThread, 0, 0 ) )
I hope you can help me compiling this.