Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

MS Detours 1.5 undeclared identifier

MS Detours 1.5 is giving me a lot of trouble lately

"DetourFunction undefined"

Does anyone know how fix this? It worked on my old computer , but it doesnt now.

any help is appreciated.
That's nice... No I don't know how to fix this because you haven't shown us anything of what you're doing. Good luck using crappy Detours. It's pretty obvious what you're doing wrong though.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(Nov 16, 2014 02:55 PM)0xDEAD10CC Wrote:  That's nice... No I don't know how to fix this because you haven't shown us anything of what you're doing. Good luck using crappy Detours. It's pretty obvious what you're doing wrong though.

I'm not doing anything , I switched computers and I remembered i had the issue where detour function wasn't defined so i tried typing Detour Function and build it
(inside a Win 32 Dll Project), I included detours.h and linked the library.

The solution might be obvious for you , but not for me.

so if you do know the solution please share .
here is what I'm doing :

Code
#include <detours.h>
#include <Windows.h>
#pragma comment (lib,"detours")

BOOL WINAPI DllMain(HINSTANCE hInst, DWORD fdwReason, LPVOID lpReserved)
{
    switch (fdwReason)
    {
    case DLL_PROCESS_ATTACH:
        DetourFunction()
        //code here
        break;

    case DLL_PROCESS_DETACH:
        break;

    case DLL_THREAD_ATTACH:
        break;

    case DLL_THREAD_DETACH:
        break;
    }
}

please understand that the code isn't meant to be doing anything , it is just to see whether or not DetourFunction is defined
try this
#pragma comment (lib,"detours.lib")
(Nov 17, 2014 11:07 AM)Dickyb0bSue Wrote:  try this
#pragma comment (lib,"detours.lib")

I fixed it , the problem was that Detours.h was above windows.h.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by ChickendipperMar 30, 2016 04:21 AM 7 282 Mar 30, 2016 04:21 AM
Last Post: Chickendipper
[C] by _Wozniak_May 5, 2015 05:13 AM 8 263 May 5, 2015 05:13 AM
Last Post: ChildMolestor
[C] by YoungHackerDec 16, 2014 06:27 AM 5 137 Dec 16, 2014 06:27 AM
Last Post: Mouse❤️