| re: Loading assembly in a seperate process
<ali.jan@gmail.com> wrote in message
news:1135067426.816208.206450@g49g2000cwa.googlegr oups.com...[color=blue]
> Hi,
>
> It is trivial to load an assembly in a new Application Domain. Is there
> any way of loading an assembly in a new process?
>
> I tried using the Process class like this:
>
> Process p = new Process()
> p.StartInfo.FileName = mStartupFile
> p.StartInfo.UseShellExecute = False
> p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
> p.StartInfo.RedirectStandardOutput = True
> p.Start()
> string text = p.StandardOutput.ReadToEnd()
> p.WaitForExit()
>
> Though this works for exes, it doesn't for DLL assemblies. On my system
> Dll is associated with Dependency Walker so it just opens the assembly
> up in it.
>
> How would I go about doing a LoadAssembly in a seperate process?
>
> Thanks...
>
> Ali
>[/color]
You can only load assemblies in your own process, not in a spawned process.
So it's up to the spawned process to load the assembly.
What exactly do you wan't to achieve, as I see no use for such remote
assembly loading?
Willy. |