tags:

views:

80

answers:

1

I am starting work on a new project where the core product is a Software Library. There is existing code we will be wrapping, written in C++ because it is very numerically intensive; we own and compile this core code.

I believe we will have two prominent client types: 1. App written in C++, probably MFC 2. App written in C#.NET.

The Question: In order to offer an "ideal" interface to both these client types, what technology do we use? For example, we could offer two interfaces, one using C/C++ functions and callbacks for the C++ clients, and the other using C#.NET for the C# clients? Also, in principle, could this be done nicely in one DLL, or will we want two (or more)?

Other info... Client apps are embedded, not a desktop or laptop; assume any UI is not Windows-based. Also we will have to compile and test for both 32-bit and 64-bit, probably C++ on 32-bit and C# on 64-bit.

My apologies here -- I realize this question may have been asked and answered previously, but if so, I was not able to find it.

+5  A: 
stakx
I like this answer, although I too was hoping to see if there were any other points of view. A work colleague sent me an internal reply, which I will paraphrase here. His idea was to, "...write the wrapper in C++/CLI so that the structure definitions can all be imported directly from the native C++ world, instead of trying to create (and maintain) matching C# structures by hand." (thanks to MVH).
MartinKB