Programming using classes, is there a way to be more....clear, soft and easy than to use classes? ^^
Im sorry, I was going to use [Development] but also to be a discussion,Code:#include <windows.h> #include <stdio.h> #include <iostream> #include <tlhelp32.h> using namespace std; class MemoryCheck { int ProcessLevel, DesiredAdress, DesiredData, Jiji, Koji, Nodame; char MainLevel[1024]; public: void AdressInfo (int); //naze ore ha (ni)2dai class wo shiyo- subeki ka void LevelInfo (char *); void DataInfo (int); int LevelSeizure() { return (ProcessLevel); } int DataSeizure() { return (DesiredData); } int AdressSeizure() { return (DesiredAdress); } char LevelChar() { return (*MainLevel); } int LevelJiji() { return (Jiji); } int LevelKoji() { return (Koji); } void ReturnProcess () { HANDLE hProcessSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPALL,0); PROCESSENTRY32 ProcessEntry = {0}; ProcessEntry.dwSize = sizeof(ProcessEntry); BOOL Return = FALSE; Return = Process32First(hProcessSnapShot,&ProcessEntry); do{ HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS,FALSE,ProcessEntry.th32ProcessID); if(hProcess) { MemoryCheck MemBuffer; BOOL NodameCurrentInfo = ReadProcessMemory(hProcess,(void *)MemBuffer.AdressSeizure(),&Nodame,4,NULL); if(Nodame == MemBuffer.DataSeizure()) { ProcessLevel = 0x1AC; } }CloseHandle(hProcess); }while(Process32Next(hProcessSnapShot,&ProcessEntry)); CloseHandle(hProcessSnapShot); } }; MemoryCheck MemInfo; void MemoryCheck::AdressInfo (int AdressParser) { DesiredAdress = AdressParser; if(GetCurrentProcess()) { Jiji = 0x4AB; } } void MemoryCheck::DataInfo (int DataParser) { DesiredData = DataParser; if(GetCurrentProcess()) { Koji = 0x4AB; } } int main () { MemInfo.AdressInfo (0x00213458); MemInfo.DataInfo (-897129893); MemInfo.DataSeizure(); MemInfo.AdressSeizure(); MemInfo.ReturnProcess(); cout << MemInfo.LevelSeizure() << endl; if(MemInfo.LevelJiji() != MemInfo.LevelKoji()) cout << MemInfo.LevelJiji() << endl; if(MemInfo.LevelSeizure() == 428) cout << "Found!" << endl; system("PAUSE"); //gcc chigatteiru ne.. return EXIT_SUCCESS; }
I mean, it is so MUCH harder to understand this is script using classes than to make it the original way, I confess that if it wasn't I to code it, I would not understand it hehe
not a release or anything else, so... what do you guys think about classes...?



Reply With Quote


