View previous topic :: View next topic |
Author |
Message |
Dacnomania Expert Cheater
Reputation: 1
Joined: 03 Sep 2010 Posts: 124
|
Posted: Tue Jan 11, 2011 4:38 pm Post subject: How to attach VB application to process |
|
|
I'm struggling to figure this out.
I'm trying to make a trainer for a game, using VB, What I want to know is how do I attach my VB application to a process ?
Also this would be nice as well, how do I open a process if it's not open and keep it attached.
+rep will be given, This will help me a lot, thanks.
Last edited by Dacnomania on Tue Jan 11, 2011 5:12 pm; edited 2 times in total |
|
Back to top |
|
 |
M.CORP Grandmaster Cheater Supreme
Reputation: 28
Joined: 28 Oct 2009 Posts: 1010
|
|
Back to top |
|
 |
Dacnomania Expert Cheater
Reputation: 1
Joined: 03 Sep 2010 Posts: 124
|
Posted: Tue Jan 11, 2011 5:13 pm Post subject: |
|
|
Thanks dude! +rep
Ah, so I'm getting errors there. o.O
Shared Sub Attach(ByRef dte As EnvDTE.DTE)
Dim processes As EnvDTE.Processes = dte.Debugger.LocalProcesses
For Each proc As EnvDTE.Process In processes
If proc.Name.IndexOf("Target.exe") <> -1 Then
proc.Attach()
End If
Next
I'm getting a compile error on Shared. |
|
Back to top |
|
 |
M.CORP Grandmaster Cheater Supreme
Reputation: 28
Joined: 28 Oct 2009 Posts: 1010
|
Posted: Tue Jan 11, 2011 5:58 pm Post subject: |
|
|
It has no error handler. BTW, have you changed "Target.exe" in to the exe you are attaching it to? That might be the problem because it needs the designated process so it could be attached.
BTW, thanks for +rep  _________________
|
|
Back to top |
|
 |
InternetIsSeriousBusiness Grandmaster Cheater Supreme
Reputation: 8
Joined: 12 Jul 2010 Posts: 1269
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 204
Joined: 25 Jan 2006 Posts: 8579 Location: 127.0.0.1
|
Posted: Tue Jan 11, 2011 10:24 pm Post subject: |
|
|
What you are trying to do doesn't require debugging or "attaching" to the process as a debugger. For simple trainer things, you just need a handle to the process which you can obtain using OpenProcess.
http://www.pinvoke.net/default.aspx/kernel32/OpenProcess.html
Then with the handle you can call:
- WriteProcessMemory
- ReadProcessMemory
And so on to do basic trainer needs. _________________
- Retired. |
|
Back to top |
|
 |
Dacnomania Expert Cheater
Reputation: 1
Joined: 03 Sep 2010 Posts: 124
|
Posted: Wed Jan 12, 2011 2:45 am Post subject: |
|
|
It has no error handler. BTW, have you changed "Target.exe" in to the exe you are attaching it to? That might be the problem because it needs the designated process so it could be attached.
BTW, thanks for +rep Very Happy
I did change it.
That is vb.net, I'm using vb 6, Will it work ?
Quote: | http://dotnetperls.com/process-start-vbnet
I am not EXACTLY sure what you want, but here you go.
|
That's also vb.net, Unless it works for vb 6 I'm stuck.
I've got vb 6 pro btw. |
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
|
Back to top |
|
 |
Dacnomania Expert Cheater
Reputation: 1
Joined: 03 Sep 2010 Posts: 124
|
Posted: Wed Jan 12, 2011 4:45 am Post subject: |
|
|
I want to uninstall vb ?, Why ?
I'm having a look at those links now. |
|
Back to top |
|
 |
Jesper Grandmaster Cheater Supreme
Reputation: 9
Joined: 21 Feb 2007 Posts: 1156
|
Posted: Wed Jan 12, 2011 5:11 am Post subject: |
|
|
Visual Basic 6 is outdated. I recommend using Pascal/Lazarus if not C/C++. |
|
Back to top |
|
 |
Dacnomania Expert Cheater
Reputation: 1
Joined: 03 Sep 2010 Posts: 124
|
Posted: Wed Jan 12, 2011 5:26 am Post subject: |
|
|
Outdated, yet thousands of people still use it.
I am definitely going to study c++. But I'm doing vb for the mean time. |
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Wed Jan 12, 2011 5:27 am Post subject: |
|
|
nobody uses vb6 except dopes and people who maintain legacy codebases for businesses and shit, there is no support for it anymore. |
|
Back to top |
|
 |
Dacnomania Expert Cheater
Reputation: 1
Joined: 03 Sep 2010 Posts: 124
|
Posted: Wed Jan 12, 2011 5:44 am Post subject: |
|
|
Still, I'm using it, besides I've seen countless trainers made in vb. |
|
Back to top |
|
 |
Jesper Grandmaster Cheater Supreme
Reputation: 9
Joined: 21 Feb 2007 Posts: 1156
|
Posted: Wed Jan 12, 2011 5:58 am Post subject: |
|
|
Why do you insist on using VB6? Just download the VB.NET Express Edition for free and use that. |
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Wed Jan 12, 2011 6:02 am Post subject: |
|
|
or better yet use C# and revel in the nice, sleek syntax instead of nasty verbose VB barfness |
|
Back to top |
|
 |
|