dll problem
Feb 22, 2012 at 6:56pm UTC
im in the middle of learning how to create and execute a dll file, however my dll is not attaching onto my target exe program, when im debugging the dll, its not hitting the breakpoint anywhere in the DllMain function, i'm trying this using detours 2.1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)<--breakpoint set here, and not pausing on injection
{
case DLL_PROCESS_ATTACH:
DetourTransactionBegin();
DetourUpdateThread( GetCurrentThread() );
DetourAttach(&(PVOID&)place_to_hook, my_code);
DetourTransactionCommit();
break ;
case DLL_PROCESS_DETACH:
DetourTransactionBegin();
DetourUpdateThread( GetCurrentThread() );
DetourDetach(&(PVOID&)place_to_hook, my_code);
DetourTransactionCommit();
break ;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
break ;
}
return TRUE;
}
does anyone know why this is?
Last edited on Feb 22, 2012 at 7:06pm UTC
Feb 22, 2012 at 9:05pm UTC
Are you attaching to a debug build of the dll or release build?
Topic archived. No new replies allowed.