Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


c++ error/ crashes when injected...

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
pakeke801
Cheater
Reputation: 0

Joined: 19 Apr 2012
Posts: 27

PostPosted: Wed Apr 25, 2012 2:14 am    Post subject: c++ error/ crashes when injected... Reply with quote

hi sir, can i ask question?????, when i injected this to a game it crashes????
maybe there is a wrong?????
help me please????
base address = 00087454
offsets= 60, 0, 24, 4

Code:
#include <Windows.h>


void mine()
{
   if (GetAsyncKeyState(VK_NUMPAD1)&1)   

   {
        Beep(512, 100);
      
      MessageBoxA(0,"HaCk AcTiVaTeD","sUcCsEs!!!",0);
   *(float*)(0x00087454+0x60+0x0+0x24+0x4)=0;
   }
   
   
   else
   {
      Beep(612, 100);
      MessageBoxA(0,"FaIlEd","HaCk NoT aCtIvAtEd!!!",0);
      DLL_PROCESS_DETACH;

   }
      if (GetAsyncKeyState(VK_NUMPAD2)&1)   
   {
        Beep(512, 100);
      MessageBoxA(0,"HaCk DeAcTiVaTeD","sUcCsEs!!!",0);
         *(float*)(0x00087454+0x60+0x0+0x24+0x4)=true;
      }
   
   
}
void huk()
{
   GetModuleHandleA("MineSweeper.exe");
}


BOOL __stdcall DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
{
   DisableThreadLibraryCalls(hDll);
   if (dwReason == DLL_PROCESS_ATTACH)
   {
//MessageBoxA(0,"D3d HaCk","ShEn LeI lIaNg", MB_OK);
//CreateThread(0,0,0,huk,0,0);
CreateThread(0,0,0,mine,0,0);

   }   
   return TRUE;
}


advance thanks to whom will help on me ^_^

_________________
this is the end!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25814
Location: The netherlands

PostPosted: Wed Apr 25, 2012 5:12 am    Post subject: Reply with quote

Your createthread start address is 0 (the third parameter is the function address)

Code:

*(float*)(0x00087454+0x60+0x0+0x24+0x4)=0;

Will most likely not result in what you want to do. Read http://forum.cheatengine.org/viewtopic.php?t=422516

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Apr 25, 2012 2:41 pm    Post subject: Reply with quote

Judging by how you wrote your thread code, I can only assume you have close to no idea what you are doing. You'd be better off slowing down, and taking the time to learn the language rather then trying to copy/paste stuff you find on the net and trying to hack together something that wont in the end teach you anything.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites