Loading a file from memory as a new process.

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi, my aim is to to somehow load a string containing the source for a .exe strait into a process without accessing the hard drive.
Currently my code goes something like this...
<pre class="prettyprint Imports System.IO
Dim file As String
file = file_source

FileOpen(5, "C:Temp.exe", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(5, file)
FileClose(5)

System.Diagnostics.Process.Start("C:Temp.exe")[/code]
However as you can see a temporary file is created on the hard drive. Is there a way to stream the file strait to memory as a new process without creating a file on the disk? If so how?
Thanks, john
<br/>


View the full article
 
Back
Top