I am having a problem with creating a remote thread. I create the remote thread to load a library. It does so succesfully. In the remote thread i then have it get the address of a function, thats where it fails.. Code of the remote thread below.
I did not include the code to prepare the remote thread, i'm pretty sure my problem isn't there
I've been fighting with this thing for 3 weeks not, rewriting every piece of code. Any ideas?
typedef FARPROC (__stdcall *PGetProcAddress)(HMODULE, LPCSTR);
// Variable that will return the module handle and function address
// Function that loads the library and gets the function address
// The path to the library we will be loading and the function
DWORD __stdcall RemoteThread (RemoteThreadBlock*);
BOOL TestFunction ();
BOOL TestFunction ()
DWORD __stdcall RemoteThread (RemoteThreadBlock* ExecuteBlock)
// Load our library and return the module handle
hModule = (*ExecuteBlock->fnLoadLibrary)(ExecuteBlock->lpModulePath);
ExecuteBlock->fFunctionAddress = (*ExecuteBlock->fnGetProcAddress)(hModule, "TestFunction");