| View previous topic :: View next topic |
| Author |
Message |
kb3z0n Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 542
|
Posted: Wed Oct 01, 2008 1:37 pm Post subject: Help, WriteProcessMemory c++ 6. |
|
|
I'm trying to use this code, but i get an error,
WriteProcessMemory(hProcess, (LPVOID)0x01002FF5, &HaloD;ToBeWritten, Newdatasize, 0);
HaloD=Dword
| Code: |
C:\Halo Trial Trainer\Halo Trial TrainerDlg.cpp(196) : error C2143: syntax error : missing ')' before ';'
C:\Halo Trial Trainer\Halo Trial TrainerDlg.cpp(196) : error C2660: 'WriteProcessMemory' : function does not take 3 parameters
C:\Halo Trial Trainer\Halo Trial TrainerDlg.cpp(196) : error C2059: syntax error : ')'
|
help?
|
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Wed Oct 01, 2008 1:41 pm Post subject: |
|
|
change to
_________________
Gone |
|
| Back to top |
|
 |
kb3z0n Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 542
|
Posted: Wed Oct 01, 2008 1:48 pm Post subject: |
|
|
C:\Halo Trial Trainer\Halo Trial TrainerDlg.cpp(196) : error C2660: 'WriteProcessMemory' : function does not take 6 parameters
heres the whole code i use
| Code: |
void OpenMem()
{
unsigned long PID; // We need this now to store the PID.
HWND hWindow=FindWindow(NULL, "MineSweeper");
CreateRemoteThread(hWindow, NULL, 0, 0, 0, NULL, NULL);
GetWindowThreadProcessId(hWindow, &);PID;
hProcess=OpenProcess(PROCESS_ALL_ACCESS, TRUE, PID);
}
void CHaloTrialTrainerDlg::OnAllSnipers()
{
OpenMem();
DWORD ToBeWritten[]={0x90};
DWORD Newdatasize=sizeof(ToBeWritten);
WriteProcessMemory(hProcess, (LPVOID)0x01002FF5, &,ToBeWritten, Newdatasize, 0);
}
|
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Wed Oct 01, 2008 1:57 pm Post subject: |
|
|
How about you actually read the errors?
http://msdn.microsoft.com/en-us/library/ms681674(VS.85).aspx
BOOL WINAPI WriteProcessMemory(
__in HANDLE hProcess,
__in LPVOID lpBaseAddress,
__in LPCVOID lpBuffer,
__in SIZE_T nSize,
__out SIZE_T *lpNumberOfBytesWritten
);
|
|
| Back to top |
|
 |
kb3z0n Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 542
|
Posted: Wed Oct 01, 2008 2:00 pm Post subject: |
|
|
| I did, but im not that good in c++, So i thought the code would work by itself, but im going to vc++.
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Wed Oct 01, 2008 2:11 pm Post subject: |
|
|
The code won't change even if you go to VC++
Your attitude sucks, Your Code doesn't even make sense
Go learn the basics before you try something obviously way out of your reach.
_________________
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Wed Oct 01, 2008 2:15 pm Post subject: |
|
|
You shouldn't copy and paste from wordpress or w/e. You get funky characters. I really need to edit my blog =[.
Last edited by Noz3001 on Wed Oct 01, 2008 2:24 pm; edited 1 time in total |
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Wed Oct 01, 2008 2:23 pm Post subject: |
|
|
| lurc wrote: | The code won't change even if you go to VC++ :roll:
Your attitude sucks, Your Code doesn't even make sense :roll:
Go learn the basics before you try something obviously way out of your reach. |
You took the words right out of my mouth.
_________________
Gone |
|
| Back to top |
|
 |
kb3z0n Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 542
|
Posted: Wed Oct 01, 2008 2:51 pm Post subject: |
|
|
| I never quit on c++ 6. right now, i just have a tut on how to do it in vC++, so i'm going to try that o.o
|
|
| Back to top |
|
 |
Heartless I post too much
Reputation: 0
Joined: 03 Dec 2006 Posts: 2436
|
Posted: Thu Oct 02, 2008 4:25 am Post subject: |
|
|
| Code: |
BOOL WriteMemory(HANDLE Handle, DWORD Address, BTYE bBuffer, DWORD dwSize)
{
DWORD TempValue;
return WriteProcessMemory(Handle, (VOID*)Address, LPVOID(&bBuffer), dwSize, &TempValue);
} |
_________________
What dosen't kill you, usually does the second time. |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Oct 02, 2008 9:14 am Post subject: |
|
|
| x0r wrote: | | Just quit, this guy won't learn. slovach, lock this thread. |
|
|
| Back to top |
|
 |
|