Question

I have a 32 bit application which I have no control over. I currently have it communicating with a 32 bit C++ DLL which massages the data and passes it on to a 32 bit .NET DLL where my C# application can get to it. I would like to upgrade my C# app to 64bits to get greater memory access.

Is there a way to get my 32 bit C++ DLL to talk to the .NET Concurrent Collections, specifically the ConcurrentQueue? Will this allow inter-process communication? If so, is there an example I could learn from? If not, does anyone know of any API or library to solve bidirectional 32 - 64 bit inter-process communications.

It seems that this would be a major problem for a lot of developers but my searching has not uncovered a fast, reliable, possibly easy solution. I find it strange that the major component developers do not offer any solutions (that I have found).

Thanks in advance for any assistance.

Was it helpful?

Solution

There's no way to have an in-process mixture of 32 and 64 bit application and dlls.

If you want to communicate between a 32 and 64 bit application then you've got a few options:

  1. Package up the 32 bit library into a COM object and host it out of process. COM will marshall the calls from 64 bit to 32 bit and back again.

  2. Use IPC (such as named pipes, TCP or WCF) to communicate between the 32 and 64 bit applications.

  3. Use memory mapped files to exchange data using shared data structures. This is probably the most complicated solution.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top