Just reads and writes at the moment. Weird thing how click to move works from cheat engine but looting doesn't.
Edit:
Ok I have read a bit about dll injection and I can understand what you have shared in your link. I think the only missing key information is the this reference passed as an argument. Is it just a reference to your injected dll class? I'm talking specifically dOnRightClickObject and dOnRightClickUnit. You would think that in order to use them you would have to pass GUID as an argument but I'm guessing they are reading the guid from the variable which stores the mouse over objects guid.
It's getting late and can't think straight. Anyways here is a useful link to anyone else who is struggling with injection:
Calling Functions From Injected Library Using Function Pointers in C++ - UnKnoWnCheaTs Game Hacking Wiki
Edit:
Is the endscene hooking necessary if I want to call warcraft's functions? I'm injecting a dll by calling remotethread and attempting to call wow functions from there but all I have managed to do was to hang wow process or get disconnected from server. The dll looks like this without includes (saving precious lines):
Code:
DWORD WINAPI dllthread(LPVOID);
DWORD g_threadID;
HMODULE g_hModule;
DWORD WINAPI dllthread(LPVOID)
{
class wowfunctions
{
public:
typedef int(__thiscall* dOnRightClickUnit)(PVOID _this);
int interact()
{
dOnRightClickUnit _OnRightClickUnit = (dOnRightClickUnit)0x00619E00; // 2.4.3
return _OnRightClickUnit(this);
}
};
wowfunctions *wowi = new wowfunctions();
wowi->interact();
delete wowi;
return 0;
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
g_hModule = hModule;
DisableThreadLibraryCalls(hModule);
CreateThread(NULL, NULL, &dllthread, NULL, NULL, &g_threadID);
}
return TRUE;
}