this isn't c++ is just "C"
Probably one of the simplest skeletons I've got:
Its really handy if you want to make your own trainer. You of course need to know how to use itCode:#include <windows.h> #include <stdio.h> int main(){ HANDLE hProcess = 0; HWND hWindow; DWORD pid = 0; hWindow = FindWindow(NULL, "Window Name"); if (hWindow){ GetWindowThreadProcessId(hWindow, &pid); } hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid); if(hProcess != NULL) printf("Process Found!"); else { printf("Process Not Found!"); return 0; } //Writes byte values to 0x00567... BYTE valueToWrite[] ={0x90, 0x90}; WriteProcessMemory(hProcess, (void*)0x00567A8F, (void*)&valueToWrite, sizeof(valueToWrite), NULL); return 0; }
THE EYE OF AN ADMINISTRATOR IS UPON YOU. ANY WRONG YOU DO IM GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE IM GONNA BE
"First they ignore you. Then they laugh at you. Then they fight you. Then you lose.” - Dave84311
HAVING VIRTUAL DETOX
ROFL. Just ROFL.
BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON
ROFLCOPTER DOWN. dontcha mean? :P
It is C++.Originally Posted by Firey
THE EYE OF AN ADMINISTRATOR IS UPON YOU. ANY WRONG YOU DO IM GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE IM GONNA BE
"First they ignore you. Then they laugh at you. Then they fight you. Then you lose.” - Dave84311
HAVING VIRTUAL DETOX
If, I remember correctly, with my limited knowledege of C++, printf is useable in C++ and C#.
Dave kept trying to make me use printf instead of std::cout << ""
BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON
well, you can code C in V C++ but its just like javascript, HTML and Javascript can be coded together.
Any c++ tutorial uses cout <<
any c tutuorial uses printf
Yeah, but the headers use the C++ format.
Maybe its a hybrid C#+!
BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON
I hate to break it to you, that is typical C. But not because of the reason he provided, because you can use printf() in both C and C++.
But there is nothing C++ specific in there; no references, classes, object orientation, or instantiation. In other words, it is C, because you can plug this code into an ANSI C compiler and it would still run.
And C# has nothing to do with this; in fact that is incorrect C# syntax.
EDIT: And by the way, both C and C++ use the same header include system.
This is a telltale sign of C:
#include <stdio.h>
This is a telltale sign of C++:
#include <iostream> //note there is no .h
using namespace ...; //C does not use namespaces
I added that... "printf();" bit. It was originally a large chunk of code stripped down. C, works with C++ because they are esentially the same thing. One is just a little more complicated.
Anyways, the bit about the header files isn't completely correct. Unless its a "compiler included header" it can't be used without the .h at the end. Anyways its good programming to include a .h at the end of every header
THE EYE OF AN ADMINISTRATOR IS UPON YOU. ANY WRONG YOU DO IM GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE IM GONNA BE
"First they ignore you. Then they laugh at you. Then they fight you. Then you lose.” - Dave84311
HAVING VIRTUAL DETOX
Actually, according to the latest C++ standard, you are supposed to leave out .h on STD libraries. The reason is because those with .h are being deprecated.
If you doubt me, go into Code::Blocks and type in a simple application with <iostream.h> and it will give you a deprecation warning.
ie...
#include <iostream>
using namespace std;
int main() {
cout<<"hi!\n";
return 0;
} //no deprecation warning
#include <iostream.h>
int main() {
cout<<"hi!\n";
return 0;
} //deprecation warning
I'm using VS 2003 and I never get deprecation warnings for that.
THE EYE OF AN ADMINISTRATOR IS UPON YOU. ANY WRONG YOU DO IM GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE IM GONNA BE
"First they ignore you. Then they laugh at you. Then they fight you. Then you lose.” - Dave84311
HAVING VIRTUAL DETOX
i'm software eng., i'm a student.
so i would like to know more about programming, i mean to build a system. my projet last year is on xml, and file maker pro. ca u help me out???
It's heating up in here, I am a C++ dropout!
BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON