I'm tyring to create some wrappers to call some C++ code (below) from C#.
The MSDN documentation is mainly about using COM to do this, but my code is
not COM. In any case, I can't figure out how to do it. I've also tried
using SWIG, again with no luck. Is there any MSDN or internet documentation
that gives a step-by-step process on how to do this? Does anyone have any
wrapper samples to wrap this kind of function?
class DOTSCENEINTERFACE_API dotSceneLoader : public
Singleton<dotSceneLoader>, public types::progressMaker
{
void load(const Ogre::String &fileName,
const Ogre::String &groupName,
SceneManager *pSceneManager,
RenderWindow *pRWin,
SceneNode *pRootNode = NULL,
bool doMaterials = false,
bool forceShadowBuffers = false,
bool updateDSInfo = false);
};
===================================================
Zachary Hilbun
Software Consultant http://www.vianova.com
Via Nova OpenGL, Open Inventor 3D products, Windows 95/NT
Dallas, Texas VC++, C#, embedded systems, VxD's
1977 SSII SRX31185 http://www.inlocalarea.com for gun information
Mattias Sjögren - 16 Jun 2006 19:42 GMT
Zachary,
>Is there any MSDN or internet documentation
>that gives a step-by-step process on how to do this?
Not that I know of. But step 1 is probably to decide what kind of
wrapper you want. The options are
- Functions exported from a DLL, called through P/Invoke
- Wrap it in a COM component, consume wthrough COM interop
- A managed C++ wrapper that exposes managed classes that you can use
directly
Which one to choose depens on a number of factors, including how many
APIs you need to wrap, their complexity, related data types and your
own C++ knowledge.
Mattias

Signature
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Zachary Hilbun - 16 Jun 2006 20:40 GMT
I was thinking of a managed C++ wrapper
===================================================
Zachary Hilbun
Software Consultant http://www.vianova.com
Via Nova OpenGL, Open Inventor 3D products, Windows 95/NT
Dallas, Texas VC++, C#, embedded systems, VxD's
1977 SSII SRX31185
http://www.inlocalarea.com for gun information
> Zachary,
>
[quoted text clipped - 14 lines]
>
> Mattias