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 


How to attach VB application to process
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Dacnomania
Expert Cheater
Reputation: 1

Joined: 03 Sep 2010
Posts: 124

PostPosted: Tue Jan 11, 2011 4:38 pm    Post subject: How to attach VB application to process This post has 1 review(s) Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
M.CORP
Grandmaster Cheater Supreme
Reputation: 28

Joined: 28 Oct 2009
Posts: 1010

PostPosted: Tue Jan 11, 2011 5:11 pm    Post subject: This post has 1 review(s) Reply with quote

http://msdn.microsoft.com/en-us/library/envdte.process.attach.aspx
_________________
Shameless Self Advertising Very Happy!
Steam
Just lurking around...
Back to top
View user's profile Send private message
Dacnomania
Expert Cheater
Reputation: 1

Joined: 03 Sep 2010
Posts: 124

PostPosted: Tue Jan 11, 2011 5:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
M.CORP
Grandmaster Cheater Supreme
Reputation: 28

Joined: 28 Oct 2009
Posts: 1010

PostPosted: Tue Jan 11, 2011 5:58 pm    Post subject: Reply with quote

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

_________________
Shameless Self Advertising Very Happy!
Steam
Just lurking around...
Back to top
View user's profile Send private message
InternetIsSeriousBusiness
Grandmaster Cheater Supreme
Reputation: 8

Joined: 12 Jul 2010
Posts: 1269

PostPosted: Tue Jan 11, 2011 7:00 pm    Post subject: Reply with quote

http://dotnetperls.com/process-start-vbnet
I am not EXACTLY sure what you want, but here you go.

_________________
FLAME FLAME FLAME!!!@@@
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Tue Jan 11, 2011 10:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Dacnomania
Expert Cheater
Reputation: 1

Joined: 03 Sep 2010
Posts: 124

PostPosted: Wed Jan 12, 2011 2:45 am    Post subject: Reply with quote

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.

Quote:
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


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
View user's profile Send private message Send e-mail AIM Address
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Jan 12, 2011 4:37 am    Post subject: Reply with quote

first you want to uninstall vb6

then you want:
http://msdn.microsoft.com/en-us/library/z3w4xdc9.aspx

then:
http://www.pinvoke.net/default.aspx/kernel32/OpenProcess.html

finally:
http://www.pinvoke.net/default.aspx/kernel32/WriteProcessMemory.html
http://www.pinvoke.net/default.aspx/kernel32/ReadProcessMemory.html


none of that debugger stuff.
Back to top
View user's profile Send private message
Dacnomania
Expert Cheater
Reputation: 1

Joined: 03 Sep 2010
Posts: 124

PostPosted: Wed Jan 12, 2011 4:45 am    Post subject: Reply with quote

I want to uninstall vb ?, Why ?
I'm having a look at those links now.
Back to top
View user's profile Send private message Send e-mail AIM Address
Jesper
Grandmaster Cheater Supreme
Reputation: 9

Joined: 21 Feb 2007
Posts: 1156

PostPosted: Wed Jan 12, 2011 5:11 am    Post subject: Reply with quote

Visual Basic 6 is outdated. I recommend using Pascal/Lazarus if not C/C++.
Back to top
View user's profile Send private message
Dacnomania
Expert Cheater
Reputation: 1

Joined: 03 Sep 2010
Posts: 124

PostPosted: Wed Jan 12, 2011 5:26 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Jan 12, 2011 5:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Dacnomania
Expert Cheater
Reputation: 1

Joined: 03 Sep 2010
Posts: 124

PostPosted: Wed Jan 12, 2011 5:44 am    Post subject: Reply with quote

Still, I'm using it, besides I've seen countless trainers made in vb.
Back to top
View user's profile Send private message Send e-mail AIM Address
Jesper
Grandmaster Cheater Supreme
Reputation: 9

Joined: 21 Feb 2007
Posts: 1156

PostPosted: Wed Jan 12, 2011 5:58 am    Post subject: Reply with quote

Why do you insist on using VB6? Just download the VB.NET Express Edition for free and use that.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Jan 12, 2011 6:02 am    Post subject: Reply with quote

or better yet use C# and revel in the nice, sleek syntax instead of nasty verbose VB barfness
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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