mixing up c# and c++ 
Author Message
 mixing up c# and c++

I have an application primarily written in C# but it relies on some Win32
functionality not available through the .NET framework, and since I did not
want to deal with PInvokes and redefining structures, I wrapped the Win32
stuff in a managed c++ dll. So far so good. However, now I need to expose
some of the objects from the c# portion of my application to the c++ dll.
The problem is that I can't compile the c# portion without referenceing the
c++ dll, but I can create the dll without the c# definitions. I guess one
solution would be to seperate the common definitions I need in a seperate
library which I could then reference or move them to the c++ wrapper. I was
wondering if anyone could suggest a cleaner way of doing this.

Thank you,
Georgi



Mon, 10 Jan 2005 03:53:07 GMT  
 mixing up c# and c++
Georgi,

Quote:
> I have an application primarily written in c# but it relies on some Win32
> functionality not available through the .NET framework, and since I did
not
> want to deal with PInvokes and redefining structures, I wrapped the Win32
> stuff in a managed c++ dll. So far so good. However, now I need to expose
> some of the objects from the c# portion of my application to the c++ dll.
> The problem is that I can't compile the c# portion without referenceing
the
> c++ dll, but I can create the dll without the c# definitions. I guess one
> solution would be to seperate the common definitions I need in a seperate
> library which I could then reference or move them to the c++ wrapper. I
was
> wondering if anyone could suggest a cleaner way of doing this.

It's pretty much a Chicken-and-egg problem. You're on the right track with
your proposed solution. The only thing I'd add is to make sure your "common
definitions" include some decent interface-based-programming ;)

--
Tomas Restrepo



Mon, 10 Jan 2005 07:50:20 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Unofficial patch for UPS debugger for C++ support

2. Fatal Error C1010 in Mixing Managed C++ and Unmanaged C++ Code

3. The MIX debugger - a MIXed bag of junk

4. mixing unmanaged and managed C++

5. Try to get DirectX started in the Mixed Managed and Unmanaged C++ Programming

6. no Intellisense with mixed Managed/Native C++

7. Mixing Managed and Unmanaged C++

8. CHEAP C or C++ compiler (MIX?)

9. Mixed Command Line Arguments in C/C++

10. Compiling C mixed with C++...

11. Question: mixing C and C++

12. C Vs Mixed C and C++

 

 
Powered by phpBB® Forum Software