Jump to content
Tuts 4 You

Calling a .net method in another process.


Recommended Posts

Hello all :)

Here is my problem: There is a program that starts up, and the user needs to click a "Play" button for it to start doing a certain thing. I want to make it so that the "Play" button is automatically pressed upon startup of the program, so that the user doesn't have to do it.

The program is coded in .NET. Normally, I would just change the entrypoint in ILDASM to something that calls the button1_click() method, but the program is wrapped in Xenocode. For the purposes of this exercise, unwrapping Xenocode is not an option (due to political reasons and my relations with the program creator...).

So, I must somehow tell the program to press button1_click() from an external process (that is running this program). I have tried sending keypresses (TAB TAB ENTER) and this was possible in earlier versions of the program, but no longer. With the newest update, in order to get the program to autorun, I must truly make it executed button1_click().

I assume now I have to do something with Reflection to get a reference to the method I want, and then execute it. Can anyone help me here? I really don't know where to start with all this .NET Reflection crap :(



Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...