Results 1 to 2 of 2
  1. #1
    fluffybananas22's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    87
    Reputation
    10
    Thanks
    1,617
    My Mood
    Mellow

    Need Help with FindWindow() function

    Hello everyone you guys may have seen that i have posted earlier in this forum but i am still running into problems. This will be the last time i post here for help if this go around does not work. I am having troubles with the FindWindow function as it seems that my program cannot find the black ops 3 window for some reason. any help?

    code:

    Code:
    #include <iostream>
    #include <windows.h>
    #include<TlHelp32.h>
    #include<string>
    
    
    using namespace std;
    
    HANDLE hProcess;
    
    void WriteProcessMemory()
    {
    	DWORD pid;
    	HWND hWindow = FindWindow(0, L"BlackOps3");
    	GetWindowThreadProcessId(hWindow, &pid);
    	hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
    
    	if (hWindow == 0)
    	{
    		cout << "Cannot find Black Ops, Exiting..." << endl;
    		Sleep(5000);
    		exit(1);
    	}
    
    }
    
    
    
    void appTitle()
    {
    	system("title Black Cocks Trainer");
    	WriteProcessMemory();
    }
    
    void appFeatures()
    {
    	system("color a");
    	cout << "Created by : FLUFFYBANANAS21" << endl;					
    	cout << "----------------------------" << endl << endl << endl;
    	cout << "NUMPAD 1 = UNLIMITED AMMO" << endl;
    	cout << "NUMPAD 2 = UNLIMITED POINTS(1000000)" << endl;
    	cout << "NUMPAD 3 = GODMODE" << endl;
    }
    
    void appHotkeys()
    {
    	int iAmmo = 50;
    	int iPoints = 1000000;
    	int iGodmode = 1000000;
    	WriteProcessMemory();
    	while (true)
    	{
    		if (GetAsyncKeyState(VK_ESCAPE))
    		{
    			cout << "Closing and freeing memory..." << endl;
    			Sleep(5000);
    			exit(1);
    		}
    		if (GetAsyncKeyState(VK_NUMPAD1))
    		{
    			Sleep(1000);
    			//hacks under here... (writeprocess)
    			WriteProcessMemory(hProcess, (LPVOID)0x0147B7FB98, &iAmmo, (DWORD)sizeof(iAmmo), NULL); //primary clip
    
    		}
    		if (GetAsyncKeyState(VK_NUMPAD2))
    		{
    			Sleep(1000);
    			//hacks under here... (writeprocess)
    			WriteProcessMemory(hProcess, (LPVOID)0x0147B96374, &iPoints, (DWORD)sizeof(iAmmo), NULL); //zombie points
    		}
    		if (GetAsyncKeyState(VK_NUMPAD3))
    		{
    			WriteProcessMemory(hProcess, (LPVOID)0x0147621428, &iGodmode, (DWORD)sizeof(iGodmode), NULL);//player health
    		}
    	}
    }
    
    int main()
    {
    	appTitle();
    	appFeatures();
    	appHotkeys();
    }
    Last edited by akim14; 05-30-2016 at 01:30 PM.

  2. #2
    KingX735's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    632
    Reputation
    49
    Thanks
    4,922
    My Mood
    Cheerful
    Like I said in the old thread, you need to use FindWindowW to get the window name, because it contains a registered mark "®"


Similar Threads

  1. [Help] Need Help With FindWindow()
    By fluffybananas22 in forum C++/C Programming
    Replies: 1
    Last Post: 05-26-2016, 11:11 AM
  2. [Solved] Need Help with FindWindow
    By fluffybananas22 in forum Call of Duty: Black Ops 3 Help
    Replies: 2
    Last Post: 05-22-2016, 05:14 PM
  3. [Help Request] Need help with numpad while recording macro !
    By JonathanTBM in forum Vindictus Help
    Replies: 2
    Last Post: 05-10-2011, 07:37 PM
  4. [Help Request] need help with mod
    By .:MUS1CFR34K:. in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 05-01-2011, 12:40 PM
  5. [Help Request] need help with modding
    By BayBee Alyn in forum Combat Arms Help
    Replies: 0
    Last Post: 04-27-2011, 09:06 PM