Click to See Complete Forum and Search --> : Legacy code in .Net


allangal
September 5th, 2002, 12:38 PM
I have been digging on the documentation on how legacy c++ code can be used in managed c++ extension. MSDN have a few pages of documentation on the how's, do's and dont's.

It seems that we need to give this subject a little more focus and content. We don't want to re-code those old but working code in .Net.

I have tried will little success on porting some code to managed c++ using wrappers. Much less on complex objects.

Have anyone tried wrapping objects using STL containers? And how to work around virtual fuctions, inheritance, multiple inheritance etc...?

Using ActiveX objects and dlls, though, was very nice. But most of our code are not one of these.

cup
September 15th, 2002, 03:24 AM
Have you tried using the code as it is? The virtual functions and multiple inheritence were probably there for a reason. Why try to work around it? When porting, just do the minimum required and use as much of the legacy stuff as possible, unless it is unmaintainable.

Look up "refactoring" on the net - may help with your porting.