You'll have to use PInvoke to get at the C++ code from your C# wrapper.
If your C++ Dll has C++ classes in it, you won't be able to PInvoke them.
I suggest you write a managed wrapper in C++/CLI. C++/CLI uses C++ Interop
(or Implicit PInvoke) and wouldn't require that you manually PInvoke. This
is especially useful if you want to use a native C++ class in C#.
--
Browse
http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"Jason" wrote:
Quote:
Hello
>
I've got a DLL that is written in C++ and I want to create a C# wrapper for
it, instead of using Pinvoke. I know this can be done, but I'm not sure how
to go about this. I've got VS 2005 and I've been looking on the net, but
not alot of clear definitions out there. For now, until I get he hang of it,
my c++ DLL is pretty basic, as it only has functions that take in and return
integers.
>
Can anyone provide an example, or point to a good place on the web?
>
Thanks
>
>
>