Popping Up MessageBox After Injection

Posts 1–3 of 3 · Page 1 of 1
Popping Up MessageBox After Injection
Code:
BOOL APIENTRY DllMain (HINSTANCE hInst     /* Library instance handle. */ ,
                       DWORD reason        /* Reason this function is being called. */ ,
                       LPVOID reserved     /* Not used. */ )
{
    switch (reason)
    {
      case DLL_PROCESS_ATTACH:
			MessageBoxA(NULL, "attatched", "Debug", MB_OK);
			DisableThreadLibraryCalls(hInst);
			CreateThread(0, 0, (LPTHREAD_START_ROUTINE)d3dthread, 0, 0, 0);
        break;

      case DLL_PROCESS_DETACH:
        break;

      case DLL_THREAD_ATTACH:
        break;

      case DLL_THREAD_DETACH:
        break;
    }

    /* Returns TRUE on success, FALSE on failure */
    return TRUE;
}
I had this problem before, where I would inject stuff into a process and it would not work. Now I have it again because the only injector that worked for me I lost. I dont see anything wrong with the coding, any helps? No messagebox popping up or anything.
Quote Originally Posted by kibbles18 View Post
Code:
BOOL APIENTRY DllMain (HINSTANCE hInst     /* Library instance handle. */ ,
                       DWORD reason        /* Reason this function is being called. */ ,
                       LPVOID reserved     /* Not used. */ )
{
    switch (reason)
    {
      case DLL_PROCESS_ATTACH:
			MessageBoxA(NULL, "attatched", "Debug", MB_OK);
			DisableThreadLibraryCalls(hInst);
			CreateThread(0, 0, (LPTHREAD_START_ROUTINE)d3dthread, 0, 0, 0);
        break;

      case DLL_PROCESS_DETACH:
        break;

      case DLL_THREAD_ATTACH:
        break;

      case DLL_THREAD_DETACH:
        break;
    }

    /* Returns TRUE on success, FALSE on failure */
    return TRUE;
}
I had this problem before, where I would inject stuff into a process and it would not work. Now I have it again because the only injector that worked for me I lost. I dont see anything wrong with the coding, any helps? No messagebox popping up or anything.
Well, since we don't see your injection code we don't know what's wrong. Your dllmain seems fine to me.
the code dosent matter because its not even getting there. The messagebox is not popping up or anything.

---------- Post added at 04:06 PM ---------- Previous post was at 04:04 PM ----------

really pissing me off because i had this prob before and no injectors work for me, i have all the latest .net framework etc

---------- Post added at 04:34 PM ---------- Previous post was at 04:06 PM ----------

ok so its apparently some bullshit problem with dev c++ becuase the exact same code works in msvc, but i hate msvc.
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Talk with us