How to Use C# to Call a Function Within a Seperate Running Native Process?
<p>Can you use C# to call a function inside of another running process that is written in C/C++?</p>

<p>I know you can do this using C++ by injecting a DLL that starts a remote thread, listens for associated key-presses, and makes a call to the desired function whose signature and address has been defined. </p>

<p>The C++ to C++ tutorial is here:
<a href="http://www.codeproject.com/Articles/29527/Reverse-Engineering-and-Function-Calling-by-Addres#Applying">http://www.codeproject.com/Articles/29527/Reverse-Engineering-and-Function-Calling-by-Addres#Applying</a></p>

<p>If I remember correctly, I've also read in the past that you cannot inject a managed DLL (C#) into an unmanaged process (C++). But perhaps another way exists...</p>

<p>The reason that I'd like to do this is to reverse engineer a PC game and write little hacks in C#, a language I'm familiar with.</p>