BrianB
October 28th, 2004, 07:43 AM
Ok, This I will try to make this as brief as possible.
All help is GREATLY appreciated.
What I have :
A MSVC++ class and corresponding .h and .lib, that work fine when compiled by themselves in managed c++ when using the IJW function (/clr) . I can make a simple exe and it works good.
Problem : It cannot talk to managed code (example the main form), and this is a major problem
My Solution :
Make a mixed code DLL, it has the old unmanaged class, and a new managed class. It can be added to a c# or c++ app as a reference and used easily.
My Code Problem:
I just dont think i did this rite. Depending on what includes i leave in i get null reference exceptions, or stack overflows. Please have a look at my code and make suggestions as to how to approach this. I basicly want to make a few simple functions in my new managed class to make the old class do what i want.
Here is my code:
The DLL : http://www.vkarlsen.no/pastebin/default.asp?id=4289
The C# app that calls it : http://www.vkarlsen.no/pastebin/default.asp?id=4290
In addition, any techniques to accomplish my goal, tips, and links greatly appreciated.:)
Brian
All help is GREATLY appreciated.
What I have :
A MSVC++ class and corresponding .h and .lib, that work fine when compiled by themselves in managed c++ when using the IJW function (/clr) . I can make a simple exe and it works good.
Problem : It cannot talk to managed code (example the main form), and this is a major problem
My Solution :
Make a mixed code DLL, it has the old unmanaged class, and a new managed class. It can be added to a c# or c++ app as a reference and used easily.
My Code Problem:
I just dont think i did this rite. Depending on what includes i leave in i get null reference exceptions, or stack overflows. Please have a look at my code and make suggestions as to how to approach this. I basicly want to make a few simple functions in my new managed class to make the old class do what i want.
Here is my code:
The DLL : http://www.vkarlsen.no/pastebin/default.asp?id=4289
The C# app that calls it : http://www.vkarlsen.no/pastebin/default.asp?id=4290
In addition, any techniques to accomplish my goal, tips, and links greatly appreciated.:)
Brian