It's not a code problem. It has to be the compiler or something. It works fine after I move it to a new project. I'll post code anyway.
Code:
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
if(ul_reason_for_call == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hModule);
CreateThread(0, 0, main, 0, 0, 0);
}
return TRUE;
}
main just detours sendpacket and initializes some class pointers(player and movementfields...).
EDIT: Also, WoW is throwing a access violation error whenever I close. I'll post back more on the error in a sec.