How I got started writing a .NET wrapper around C ++ Omniorb-stub

My task is to access the CPRBA server application from .NET 3.5. After evaluating projects like IIOP.Net (undefined state) and products like VisiBroker (expensive), I would like to do it "myself" and write a .Net-Wrapper around C ++. The shortcuts created my Omniidl (Omniorb IDL for C ++ Generator). This means writing some layer of managed code (CLI) around unmanaged C ++ code.

My question is, does anyone have any experience with this thread? I honestly don't know how best to do this. My current plan is to create a managed class for each unmanaged class, with each managed class having an instance member of the unmanaged class that is not garbage collected. Is this correct or am I wrong?

Thanks in advance!

+2


a source to share


1 answer


From my experience, this is one way to solve this problem - for each unmanaged class, write a wrapper for a .NET class. You should learn how to use the code so you don't have to write a lot of code.



Another option is to create .NET wrappers around common functionality - you can reduce some of the work by using a facade - if you have multiple classes that you need for a single operation or group of operations, you can create a single. NET which manages all of them.

+1


a source







All Articles