SolvedGetting Cross Fire Handle \ window

Posts 1–15 of 23 · Page 1 of 2
Getting Cross Fire Handle \ window
I am coding console application for Cross Fire and when crossfire start and after my console do FindWindow() it fail, tried with other games and my console worked perfect, so the problem isn't from my code.


http://i.imgur.com/rW1ofaI.jpgⓘ
Findwindow("Cross Fire");
You can check the name on the taskbar...
Also, you need OpenProcess for external hacks
so if you use C#:
Process.GetProcessesByName("crossfire");

And then use the handle...
Or check some trainer tutorial on the web...

But don't forget:
in the loop:
Close the process on the end, and add some delay, cuz Xtrap will fuck up everything...
Quote Originally Posted by rabir007 View Post
Findwindow("Cross Fire");
You can check the name on the taskbar...
Also, you need OpenProcess for external hacks
so if you use C#:
Process.GetProcessesByName("crossfire");

And then use the handle...
Or check some trainer tutorial on the web...

But don't forget:
in the loop:
Close the process on the end, and add some delay, cuz Xtrap will fuck up everything...
Don't worry i did close handle and some shits so xtrap won't show up

uhm.. I'll go try "Cross Fire" with space between cross and fire.
Quote Originally Posted by xreality14 View Post
Don't worry i did close handle and some shits so xtrap won't show up

uhm.. I'll go try "Cross Fire" with space between cross and fire.
If you can TeamViewer i might help you, i worked on an external Crossfire trainer too...
But Which prog lang are you using ?


"Cross Fire" won't work cause Crossfire window name is CrossFire ...
@rabir007 c++
Quote Originally Posted by xreality14 View Post


"Cross Fire" won't work cause Crossfire window name is CrossFire ...
@rabir007 c++
:/ I used C# for my trainer...
Quote Originally Posted by rabir007 View Post


:/ I used C# for my trainer...
anyway ... here's how i do it.
Quote Originally Posted by xreality14 View Post
anyway ... here's how i do it.
Try to get the handle for a process by name, not by the Window...
Quote Originally Posted by rabir007 View Post


Try to get the handle for a process by name, not by the Window...
Okay, let me go and test
xtrap is doing it's job.
Quote Originally Posted by Synns View Post
xtrap is doing it's job.
It does everything, except its job...
loop until FindWindow(TEXT("Crossfire"), NULL); returns something
works fine here /

also here is a bad alternation that may work with any window, regardless of its name
Code:
BOOL WINAPI EnumProc(HWND hWnd, LPARAM lParam)
{
	DWORD PID;
	GetWindowThreadProcessId(hWnd, &PID); //check window process
	if (PID == GetCurrentProcessId())
	{
		RECT rect;
		GetWindowRect(hWnd, &rect);
		if ((rect.right-rect.left > 50) && (rect.bottom-rect.top > 50)) //check window size
		{
			*(HWND*)(lParam) = hWnd;
			return FALSE;
		}
	}
	return TRUE;
}

HANDLE hWnd = NULL;
while (!hParent)
{
	EnumWindows(EnumProc, (LPARAM)&hWnd);
	Sleep(100);
}
find window has something like bugs , if u open a folder with the same name it will handle it and that may cause some errors if.u didn't close.the crossfire folder haha , it has.just happened to me
Quote Originally Posted by DarkPladin View Post
find window has something like bugs , if u open a folder with the same name it will handle it and that may cause some errors if.u didn't close.the crossfire folder haha , it has.just happened to me
This isn't my problem.
Check the loop , try to open game first and then open the console . If it works then your loop has error
Posts 1–15 of 23 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?