| View previous topic :: View next topic |
| Author |
Message |
Webtijn How do I cheat?
Reputation: 0
Joined: 13 Jun 2007 Posts: 4
|
Posted: Wed Jun 13, 2007 6:24 am Post subject: [C#] Follow Programmes |
|
|
Hi,
I've got a problem. When I start FlyFF I can see it in the process bar. But when it's done with patching it dissapears in the process list! The only option is using the 'Watch' option in CE, but CE like always detected.
Does anyone know how to make a 'watch programme' option like CE has got? I'm programming in C#.NET, but any other information is also good enough.
(Sorry for my bad english)
--
Me |
|
| Back to top |
|
 |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Wed Jun 13, 2007 7:01 am Post subject: |
|
|
| Isn't maple's window is hidden or something? |
|
| Back to top |
|
 |
Webtijn How do I cheat?
Reputation: 0
Joined: 13 Jun 2007 Posts: 4
|
Posted: Wed Jun 13, 2007 7:25 am Post subject: |
|
|
| x0r wrote: | | FindWindow, GetWindowThreadProcessId, OpenProcess. |
Thnx for the names, i've googled a bit and think i've found some usefull stuff! I just don't know if it really follows the process like I needed..  |
|
| Back to top |
|
 |
pwnedurass How do I cheat?
Reputation: 0
Joined: 13 Jun 2007 Posts: 5
|
Posted: Wed Jun 13, 2007 12:42 pm Post subject: |
|
|
lol thats for like virus'es to make them open. . |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Wed Jun 13, 2007 3:17 pm Post subject: |
|
|
You could try the managed way.
System.Diagnostics, and try the process class. One way to check for the process would be getting it's length. If it's 0, it's not there, otherwise, it's running. |
|
| Back to top |
|
 |
Webtijn How do I cheat?
Reputation: 0
Joined: 13 Jun 2007 Posts: 4
|
Posted: Thu Jun 14, 2007 6:19 am Post subject: |
|
|
FindWindow and System.Process.GetProcessByName are both giving different returns, but the MSDN site says they both return a handle to the specified programme.
FindWindow:
"If the function succeeds, the return value is a handle to the window that has the specified class name and window name."
GetProcessByName:
"An array of type Process that represents the process resources running the specified application or file."
These are different returns, but MSDN says it are both handles to the programme. Why does GetProcessByName works, but FindWindow dont?
What am I doing wrong? |
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Thu Jun 14, 2007 6:55 am Post subject: |
|
|
| Code: | | HWND hMapleWindow = FindWindow(0, "MapleStory"); |
hMapleWindow is the handle to maplestory. Pass this to GetWindowThreadProcessId to get Maple's PID then use that to OpenProcess |
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Thu Jun 14, 2007 7:37 am Post subject: |
|
|
| you mean FindWindow("MapleStoryClass", "MapleStory"), is quicker and yields more accurate results. |
|
| Back to top |
|
 |
the_undead Expert Cheater
Reputation: 1
Joined: 12 Nov 2006 Posts: 235 Location: Johannesburg, South Africa
|
Posted: Thu Jun 14, 2007 7:47 am Post subject: |
|
|
Actually concidering he's using C# He would have to use IntPtr instead of HWND.
| Code: | [DllImport("USER32.DLL")]
public static extern IntPtr FindWindow(
string lpClassName,
string lpWindowName);
[DllImport("user32.dll", SetLastError = true)]
static extern uint GetWindowThreadProcessId(
IntPtr hWnd,
out uint lpdwProcessId);
[DllImport("kernel32.dll")]
public static extern IntPtr OpenProcess(
UInt32 dwDesiredAccess,
Int32 bInheritHandle,
UInt32 dwProcessId);
UInt32 ProcID;
IntPtr hMapleWindow = FindWindow("MapleStoryClass","MapleStory");
GetWindowThreadProcessId(hMapleWindow, out ProcID);
IntPtr ProcessHandle = OpenProcess(0x1F0FFF, 1, ProcID);
|
_________________
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Thu Jun 14, 2007 8:18 am Post subject: |
|
|
| appalsap wrote: | | you mean FindWindow("MapleStoryClass", "MapleStory"), is quicker and yields more accurate results. |
How would I know the class name?.. |
|
| Back to top |
|
 |
Webtijn How do I cheat?
Reputation: 0
Joined: 13 Jun 2007 Posts: 4
|
Posted: Thu Jun 14, 2007 9:17 am Post subject: |
|
|
| noz3001 wrote: | | appalsap wrote: | | you mean FindWindow("MapleStoryClass", "MapleStory"), is quicker and yields more accurate results. |
How would I know the class name?.. |
Usually I just put null for the first argument of FindWindow. I've got no idea how to find the class of a process.
| the_undead wrote: | | Actually concidering he's using C# He would have to use IntPtr instead of HWND. |
Thnx dude! This is really great! I think i've thought out how to make it work (Well, you did the most of it, thanks again!) Also the others, thank you so much! Your answers were so quick 
Last edited by Webtijn on Thu Jun 14, 2007 9:30 am; edited 2 times in total |
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Thu Jun 14, 2007 9:24 am Post subject: |
|
|
| noz3001 wrote: | | How would I know the class name?.. |
au3 spy or spy++ |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Jun 14, 2007 10:16 am Post subject: |
|
|
| pinvoke.net is a great website for getting pinvoke signatures for API's. Fast and easy, saves you from having to write them yourself. |
|
| Back to top |
|
 |
the_undead Expert Cheater
Reputation: 1
Joined: 12 Nov 2006 Posts: 235 Location: Johannesburg, South Africa
|
Posted: Thu Jun 14, 2007 10:41 am Post subject: |
|
|
Total waste of time. I assume youre going to be using MSDN in addition to.
MSDN tells you where to import it from and the data types. Simple. And I can garentuee its quicker. _________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Jun 14, 2007 11:24 am Post subject: |
|
|
| the_undead wrote: | Total waste of time. I assume youre going to be using MSDN in addition to.
MSDN tells you where to import it from and the data types. Simple. And I can garentuee its quicker. |
What could be quicker than copy/pasting? Especially if you have the nice little plugin for VS. |
|
| Back to top |
|
 |
|