| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| UnLmtD Grandmaster Cheater
 
  Reputation: 0 
 Joined: 13 Mar 2007
 Posts: 894
 Location: Canada
 
 | 
			
				|  Posted: Tue Mar 27, 2007 8:04 pm    Post subject: Process id |   |  
				| 
 |  
				| For the past few days I been learning API's and I have a problem trying to get MapleStory PID using: I know that gameguard acts like a root kit by hiding MapleStory. Therefor that API doesn't. I tried 	  | Code: |  	  | GetWindowThreadProcessId | 
  	  | Code: |  	  | #include <iostream> #include <windows.h>
 
 using namespace std;
 
 int main(int argc, char* argv)
 {
 
 DWORD gamepid=0;
 HWND gamehwnd;
 HANDLE gamehandle;
 
 cout<<"Locating Maple Story...\n";
 cout.flush();
 
 do {
 gamehwnd=FindWindow("MapleStoryClass","MapleStory");
 } while(gamehwnd==0);
 cout<<"Maple Story detected in memory!\n";
 cout.flush();
 
 GetWindowThreadProcessId(gamehwnd,&gamepid);
 gamehandle=OpenProcess(PROCESS_ALL_ACCESS,false,gamepid);
 
 if(gamehandle==0) {
 cout<<"Error: Cannot open process\n";
 cout.flush();
 getchar();
 return -1;
 }
 }
 | 
 
 Even when MapleStory is still in Task manager > Processes it does't work. So can anyone point me to something?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| appalsap Moderator
 
  Reputation: 0 
 Joined: 27 Apr 2006
 Posts: 6753
 Location: Pakistan
 
 | 
			
				|  Posted: Tue Mar 27, 2007 8:09 pm    Post subject: |   |  
				| 
 |  
				| When gameguard is stripped, that code works fine. 
 also, here is your code... improved!
   
 
  	  | Code: |  	  | #include <windows.h>
 
 HANDLE std;
 DWORD CWrite(LPSTR lpszMessage);
 
 int main()
 {
 DWORD pid; HWND gw; HANDLE hw;
 std = GetStdHandle(-11);
 
 CWrite("Locating MapleStory...\n");
 gw = FindWindow("MapleStoryClass", "MapleStory");
 if (!gw) {
 CWrite("Can't find Window\n");
 return GetLastError();
 }   else {
 CWrite("Found window...\n");
 }
 
 GetWindowThreadProcessId(gw, &pid);
 hw = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
 if (!hw) {
 CWrite("Could not open Process\n");
 return GetLastError();
 }   else {
 CWrite("Opened Process.\n");
 }
 
 CloseHandle(hw);
 CloseHandle(gw);
 CloseHandle(std);
 return 0;
 }
 
 DWORD CWrite(LPSTR lpszMessage)
 {
 DWORD ass = 0;
 WriteFile(std, lpszMessage, lstrlen(lpszMessage), &ass, NULL);
 return ass;
 }
 
 | 
 _________________
 
 
 Last edited by appalsap on Tue Mar 27, 2007 8:19 pm; edited 2 times in total
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| UnLmtD Grandmaster Cheater
 
  Reputation: 0 
 Joined: 13 Mar 2007
 Posts: 894
 Location: Canada
 
 | 
			
				|  Posted: Tue Mar 27, 2007 8:17 pm    Post subject: |   |  
				| 
 |  
				| So if I can disable gameguard from hiding maplestory it will work? |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| ravicus Master Cheater
 
 ![]() Reputation: 0 
 Joined: 16 Dec 2006
 Posts: 464
 
 
 | 
			
				|  Posted: Tue Mar 27, 2007 8:18 pm    Post subject: |   |  
				| 
 |  
				| Lol, have fun killing gameguard. _________________
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| UnLmtD Grandmaster Cheater
 
  Reputation: 0 
 Joined: 13 Mar 2007
 Posts: 894
 Location: Canada
 
 | 
			
				|  Posted: Tue Mar 27, 2007 8:19 pm    Post subject: |   |  
				| 
 |  
				|  	  | ravicus wrote: |  	  | Lol, have fun killing gameguard. | 
 
 Did I say anything about "killing gameguard"?
 
 Thanks  appalsap
 
 Last edited by UnLmtD on Tue Mar 27, 2007 8:21 pm; edited 1 time in total
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| appalsap Moderator
 
  Reputation: 0 
 Joined: 27 Apr 2006
 Posts: 6753
 Location: Pakistan
 
 | 
			
				|  Posted: Tue Mar 27, 2007 8:21 pm    Post subject: |   |  
				| 
 |  
				|  	  | zomgiownyou wrote: |  	  | So if I can disable gameguard from hiding maplestory it will work? | 
 
 well no, your computer will lock up because you will have RESOURCE LEAKS since you don't CLOSE your HANDLES
 _________________
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |