I think I follow. I will try to help in simple English.
Now you have:
- a data file (asd)
- an application (originalExe)
Now application can read data file and it does something useful.
Your problem is:
You do not want to use data file. You want to run a second application with data in memory instead. You want to pass values in memory to originalExe without a data file.
This is very easy in UNIX, because applications accept input from
stdin
and output to
stdout
but in Windows it is harder. The easy way is make a temporary file.
using System.IO;
byte[] MyFileAsd = new byte[] { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9 };
private void button1_Click(object sender, EventArgs e)
{
string temp = Path.GetTempFileName();
File.WriteAllBytes(temp, FyFileAsd);
string exe = Application.StartupPath + @"\originalExe.exe";
Process.Start(exe, temp);
}