C# with C++ functions


MPD78
08-24-2009, 09:09 AM
Hello all,

All of my C++ programming experience is in the coding of console applications and I have recently been asked to re-code some of my console applications as windows forms applications. I asked two highly experienced programmers (one a physicist and the other a financial/business relations expert) about C++ for windows forms applications and they told me never to use C++ for windows forms applications. The main reason being, simply too much time and complexity.

However, they did instruct me to use C# for the windows forms and link the needed C++ functions. Neither of them directed me as to how you link the C++ functions to the C# forms.

I have a good deal of experience with forms, controls, and events in VBA for Excel and Access so I am not totally green with form applications.

So I have two questions;

1. Are they correct about "never use C++ for windows form applications"?

2. Does anyone have a simple example of how to link the two languages together?

Thanks
Matt

MPD78
08-25-2009, 10:36 AM
Well, I have figured out how to do this through the use of dll files. However, when I try to create a dll with C++ 2008 Express on my Windows XP machine, I recieve an error that the regsv32 cannot resolve external symbols.

Does anyone know a fix for this?

Thanks
Matt