Home Forums Programming C# Wrapper for C++ Dll Reply To: C# Wrapper for C++ Dll


My ODE is rusty, but you shouldn’t need dBase – that’s an internal structure. The ODE API operates with opaque types (dWorldID, dBodyID etc); the idea is that the calling program doesn’t need to know the layout or contents of most (if not all) of the structures used by the library. Rather (as an example) you call dWorldCreate to create a world (returns a dWorldID), the actual contents of which are never known to the calling program- to perform operations on the object you pass it as an argument to the API call which does the work internally (so dWorldStep(dWorldID, …) to step the world etc).

So you should be able to use a technique like the one described here (I’m no .NET expert, but the article contents sound about right): http://blogs.msdn.com/jmstall/archive/2006/11/29/mashal-opaque-structs-with-intptr.aspx