views:

32

answers:

2

I am looking for suggestions on how to, on Windows, execute a windows form and/or WPF application, and force it's display to always be shown within the grahpic context of another completely separate process (basically as if the "child" process were simply another form control).

As a little bit of background, we have a legacy 32 bit application that we have inherited, of which relies upon quite a few third party libraries that are not offered by their respective suppliers as 64 bit assemblies. Our task is to augment this legacy application, which by itself has very little to no need for a 64 bit address space, with new functionality that requires more memory than any 32 bit process is able to provide.

As far as I know, we will need to support everything from windows xp x64 -> windows 2008r2/win7 x64.

I'm completely open to any suggestions, and appreciate very much everyone's input that respond!

+1  A: 

I'm not aware of any techniques for achieving what you ask for - my recommendation would be to instead keep all of your UI in the 32 bit address space, and use inter-process communication to offload the memory intensive parts of your application into a separate process instead.

Kragen
While I would agree that this seems the most logical way to achieve the desired result, there are political/legacy architectural issues that seem to stand in the way, and that are seemingly irreconcilable at this time. The newer code will most likely need to be kept within it's own 64 bit address space. Thanks for the quick answer, though. Also, as a side note, we are also exploring the option of splitting out the applications completely, and just using WCF as an IPC mechanism to communicate between the two - this seems to be the leading solution if all else fails...
A: 

A possibility is to use 'Windows Hooking." It's pretty wild stuff. http://www.hook-api.com/ Search for those terms and you'll find some interesting stuff.

General explanation of hooking. http://en.wikipedia.org/wiki/Hooking

Another possibility is to use a third-party program like Citrix that can run non-Windows programs in a Windows window/environment. Perhaps getting that to run as a control in a Widnows app. I understand it's an old Win32 app, but in this case one could consider the old app "non-windows."

HTH

JustBoo
Thank you for the suggestions. We already have an engineer looking into Citrix's API to see what's possible there. I'll look into what the windows hooking mechanisms provide, and see if there may be something of interest there. Pretty interesting stuff!