ExclamationDetour Stuff

Posts 1–4 of 4 · Page 1 of 1
Detour Stuff
Can someone help me with my AOSHack , I have updated my Detours.h and it cant find this..
I'm new to this detour stuff, also have Detours Express installed.
Located At:
Code:
#include <Windows.h>
#include "Game.h"
#include <detours.h>


#define MakeThread(x) CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)x, NULL, NULL, NULL)


void HookGame()
{
    DetourTransactionBegin();
    DetourUpdateThread(GetCurrentThread());
    DetourAttach(&(PVOID&)LoopThroughIngamePlayers_Org, LoopThroughInGamePlayers_Hook);
    DetourAttach(&(PVOID&)NameRenderer_Org, NameRenderer_Hook);
    DetourTransactionCommit();
}


void UnHookGame()
{
    DetourTransactionBegin();
    DetourUpdateThread(GetCurrentThread());
    DetourDetach(&(PVOID&)LoopThroughIngamePlayers_Org, LoopThroughInGamePlayers_Hook);
    DetourDetach(&(PVOID&)NameRenderer_Org, NameRenderer_Hook);
    DetourTransactionCommit();
}


void Initialize();
void Stop();


namespace Globals
{
    HMODULE hDll;
    BOOL IsExiting;
}


namespace Threads
{
    HANDLE hMainLoop;
}


BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
    switch(fdwReason)
    {
    case DLL_PROCESS_ATTACH:
        Globals::IsExiting = FALSE;
        Globals::hDll = hinstDLL;
        MakeThread(Initialize);
        break;
    case DLL_PROCESS_DETACH:
        Stop();
        break;
    }
    return TRUE;
}


void Initialize()
{    
    Beep(2500, 500);
    InitializeGame();
    HookGame();
}


void Stop()
{
    Globals::IsExiting = TRUE;
    UnHookGame();
    Beep(500, 500);
}
Error
Code:
1>------ Build started: Project: AoS, Configuration: Debug Win32 ------
1>dllmain.obj : error LNK2019: unresolved external symbol _DetourTransactionCommit@0 referenced in function "void __cdecl HookGame(void)" (?HookGame@@YAXXZ)
1>dllmain.obj : error LNK2019: unresolved external symbol _DetourAttach@8 referenced in function "void __cdecl HookGame(void)" (?HookGame@@YAXXZ)
1>dllmain.obj : error LNK2019: unresolved external symbol _DetourUpdateThread@4 referenced in function "void __cdecl HookGame(void)" (?HookGame@@YAXXZ)
1>dllmain.obj : error LNK2019: unresolved external symbol _DetourTransactionBegin@0 referenced in function "void __cdecl HookGame(void)" (?HookGame@@YAXXZ)
1>dllmain.obj : error LNK2019: unresolved external symbol _DetourDetach@8 referenced in function "void __cdecl UnHookGame(void)" (?UnHookGame@@YAXXZ)
1>C:\Documents and Settings\Owner\My Documents\Visual Studio 2010\Projects\AoS\Debug\AoS.dll : fatal error LNK1120: 5 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any help? :/
Via. Teamviewer or posting.
My advice to you would be to learn hooking. It will save you a bunch of time since ms detours are detected on most games.
Looks like you're not including a .lib from the errors. I haven't used MS detours before though so beyond that general analysis I can't help you.
What Jason said.

Code:
#pragma comment(lib,"C:\path\detours.lib");
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us