Solved C++ MessageBox() is not working on some computers.

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

leang_97

Newbie
Full Member
Aug 1, 2013
7
192
0
Well, i have succesfully builded a dll that will pop up a message after we injects it...... but it will not gonna work on some computers (especially the 64 bit some 32bit not working oso)... i dk why...... someone please help! But it is working on my computer........... i cant get any result on google.....


CODE :

C++:
#include <windows.h>
#pragma comment (lib, "user32.lib")

BOOL WINAPI DllMain(HINSTANCE hinstModule, DWORD dwReason, LPVOID lpvReserved)
{
 if(dwReason == DLL_PROCESS_ATTACH)
 {

 }

 if(dwReason == DLL_PROCESS_DETACH)
 {
     GetModuleHandle("User32.dll");
     MessageBox(NULL,"CONTENT.","TITLE",MB_OK);
  DisableThreadLibraryCalls(hinstModule); 
 }

 return FALSE;
}
 

Nether

The Angel Of Verdun
Meme Tier VIP
Dank Tier Donator
Dec 11, 2013
293
3,738
16
But i ussually working well in my computer, but idk why some of my friends cannot see it =.=
check you build the release as 32bit / 64bit for corresponding freinds then :) usually 32bit build should work just fine
 

Szaka

Coder
Full Member
Nobleman
Mar 14, 2013
161
718
3
why not on attach? why u call getmodulehandle? why return false? this code cannot work
 

leang_97

Newbie
Full Member
Aug 1, 2013
7
192
0
So that means i need to return TRUE? And yeah the getmoduleahndle did nothing actually....
 

till0sch

Respected Hacker
Dank Tier VIP
Dank Tier Donator
Oct 14, 2012
1,104
12,593
51
If you want the MessageBox to show when injected use the ATTACH case and your DllMain should return TRUE. (As Szaka said)
 

leang_97

Newbie
Full Member
Aug 1, 2013
7
192
0
But i ussually working well in my computer, but idk why some of my friends cannot see it =.=
 

leang_97

Newbie
Full Member
Aug 1, 2013
7
192
0
Yes it works well on 32 - bit computer, i think so. Because i have a 32 bit machine , but it also not working on SOME 32 bit computer.......... LOL my friend sent me a video that use my dll on a 32 bit machine, it doesnt pop up oso :facepalm:
 
Last edited:
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods