Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool GWCA::SetCharacterName(string name)
- {
- char buf[256];
- sprintf_s(charactername,255, "%s", name.c_str());
- sprintf_s(buf,255, "GameRevision.com - %s", charactername);
- this->gwHWND = FindWindowA(0, buf);
- if((DWORD)this->gwHWND < 1)
- {
- return false;
- }
- char _PIPE_NAME[256];
- GetWindowThreadProcessId(this->gwHWND,&this->PID);
- this->hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, this->PID);
- sprintf_s((char*)_PIPE_NAME, 40, "\\\\.\\pipe\\_%lu", this->PID);
- this->hPIPE = CreateFileA(_PIPE_NAME, GENERIC_WRITE|GENERIC_READ ,0, 0, OPEN_EXISTING,0, 0);
- return true;
- }
- ///////////////////
- #include "Main.h"
- GWCA* api = new GWCA();
- int main() {
- api->SetCharacterName("Eden The Pure Soul");
- api->MoveEx(0, 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement