Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[HELP C#]PID
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
kittonkicker
I post too much
Reputation: 1

Joined: 19 Apr 2006
Posts: 2171

PostPosted: Sat Feb 09, 2008 10:25 pm    Post subject: Reply with quote

I was about to say that I wasn't aware you could use std::string as a replacement for a char* without doing "string.c_str()", but I guess C# works differently >.<
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sat Feb 09, 2008 10:50 pm    Post subject: Reply with quote

@Kiki:

Yeah, C# makes it so much easier. You can simply use "string" for everything. None of those overriding buffers, etc. =)

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Sun Feb 10, 2008 4:27 am    Post subject: Reply with quote

MessageBox.Show(System.Diagnostics.Process.GetProcessesByName("MapleStory")[0].Id.ToString("X"));

Edit: Oh, after gameguard loaded...
After gameguard loaded find the window's handle.
Use FindWindow.
Back to top
View user's profile Send private message
Henley
Grandmaster Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 671

PostPosted: Sun Feb 10, 2008 11:54 am    Post subject: Reply with quote

I wanted to test WPM and RPM but it seems like I won't be able to do that with PID, Proc Handle or Proc Name Sad

Is there a way to use WPM and RPM with the window handle?
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sun Feb 10, 2008 11:58 am    Post subject: Reply with quote

How else would you use WPM? o___O

Code:

BOOL WINAPI WriteProcessMemory(
  __in   HANDLE hProcess,
  __in   LPVOID lpBaseAddress,
  __in   LPCVOID lpBuffer,
  __in   SIZE_T nSize,
  __out  SIZE_T* lpNumberOfBytesWritten
);


that's the declaration in C++

Here's C#:

Code:

[DllImport("kernel32.dll")]
public static extern bool WriteProcessMemory(
IntPtr hProcess,
IntPtr lpBaseAddress,
IntPtr lpBuffer,
uint nSize,
uint lpNumberOfByteWritten);


I'm pretty sure.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Henley
Grandmaster Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 671

PostPosted: Sun Feb 10, 2008 12:07 pm    Post subject: Reply with quote

samuri25404 wrote:

Here's C#:

Code:

[DllImport("kernel32.dll")]
public static extern bool WriteProcessMemory(
IntPtr hProcess,
IntPtr lpBaseAddress,
IntPtr lpBuffer,
uint nSize,
uint lpNumberOfByteWritten);


The first one "IntPtr hProcess", isn't that the process handle?
Btw, my first attempt to WPM with MapleStory >.>.
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sun Feb 10, 2008 12:10 pm    Post subject: Reply with quote

Yep.
_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Henley
Grandmaster Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 671

PostPosted: Sun Feb 10, 2008 12:25 pm    Post subject: Reply with quote

Is there a way for window handle? o_O
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sun Feb 10, 2008 12:35 pm    Post subject: Reply with quote

OH!

I see what you're saying.

My bad, and I don't think so.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
です
Newbie cheater
Reputation: 0

Joined: 09 Feb 2008
Posts: 20

PostPosted: Mon Feb 18, 2008 9:58 pm    Post subject: Reply with quote

So did this problem ever get resolved? I'm trying to do the exact same thing, but the pID is set to 0 (which is also shared by System Idle Process, which is unaccessible). My engine is general-purpose, but I would like to be able to bypass hack detections at some point in the future.

Also, I observed that UCEs can attach to the process even when the pID is 0. Do they the window handle?
Back to top
View user's profile Send private message
Henley
Grandmaster Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 671

PostPosted: Tue Feb 19, 2008 12:14 am    Post subject: Reply with quote

です wrote:
So did this problem ever get resolved? I'm trying to do the exact same thing, but the pID is set to 0 (which is also shared by System Idle Process, which is unaccessible). My engine is general-purpose, but I would like to be able to bypass hack detections at some point in the future.

Also, I observed that UCEs can attach to the process even when the pID is 0. Do they the window handle?


CE attaches to the process when the PID is not 0 which is before gameguard is loaded. You should just make a DLL, writing memory inside the process would be alot easier than using PID.
Back to top
View user's profile Send private message
CyClonenl
Newbie cheater
Reputation: 0

Joined: 12 Mar 2005
Posts: 24

PostPosted: Tue Feb 19, 2008 2:16 am    Post subject: Reply with quote

I've made a class that will make reading/writing memory easy in C#. Ill post it soon.

You can just specify the name of the process and read/write to it.
Back to top
View user's profile Send private message
です
Newbie cheater
Reputation: 0

Joined: 09 Feb 2008
Posts: 20

PostPosted: Tue Feb 19, 2008 8:00 pm    Post subject: Reply with quote

aznkidtroll wrote:
です wrote:
So did this problem ever get resolved? I'm trying to do the exact same thing, but the pID is set to 0 (which is also shared by System Idle Process, which is unaccessible). My engine is general-purpose, but I would like to be able to bypass hack detections at some point in the future.

Also, I observed that UCEs can attach to the process even when the pID is 0. Do they the window handle?


CE attaches to the process when the PID is not 0 which is before gameguard is loaded. You should just make a DLL, writing memory inside the process would be alot easier than using PID.


That's another option that I've already done: embedding Lua into a C DLL that can be injected (which is also included in my engine), so that I can script my hacks without having to compile a DLL every time I want to make changes.

If writing is impossible the way I want to do it, then I'll forget it for now.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Tue Feb 19, 2008 8:45 pm    Post subject: Reply with quote

In C# IntPtr is a generic handle... it can be used for a Window Handle, Process Handle, etc. you get the picture.

to get the window handle you could use FindWindow by importing it from the user32 dll

_________________
Back to top
View user's profile Send private message
newb09
Master Cheater
Reputation: 0

Joined: 02 Feb 2007
Posts: 350

PostPosted: Tue Feb 19, 2008 9:38 pm    Post subject: Reply with quote

ok yes GameGuard hides MapleStory Process and hides PID try making a driver that hooks to maple that should work look at the source of Cheat Engine's driver that helped me Smile had the same problem.
_________________
NOOBXOR = Comes from the root words noob and haxor, hence noobxor.
word created by: newb09 & ferenzo
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites