Folks, I knew it would work, but just in case it's of interest I can report
that a parent Any CPU process can start a child x86 process which can
Interop with native 32-bit DLLs.

I opened a mini WCF server with TCP binding in the child and
a corresponding WCF client in the parent. Then the parent and child can
talk to each other and the parent can (indirectly) pull data back from the
C++ DLL down in the child process. This creates really good isolation, as
the child process and the native stuff is all pushed off into its own
folder and doesn't pollute the caller. You can see the Process parent-child
relationship in procexp.

You've got to set all the
ProcessStartInfo<http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.processstartinfo.processstartinfo(v=vs.100).aspx>values
correctly for your needs, set
EnableRaisingEvents<http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.process.enableraisingevents(v=vs.100).aspx>=
true and listen to the
Exited<http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.process.exited(v=vs.100).aspx>exit
to know if the child actually exits when you request it to. The parent
can exit and the child keeps running (like foreground Threads do). It's up
to you to negotiate the lifetimes of the parent and child correctly.

Greg K

Reply via email to