I have written a few C# programs (VS2010) which call C++ native code DLLs, via DLLImport.
I gather that with OpenCascade I need to provide wrappers and am considering buying the wrapper package from OpenCascade SAS.
But I would like to understand what is involved.
Specifically, looking at the C# sample, the file OCCViewer.CPP appears to consist not of wrappers but of another class altogether (OCCViewer) which calls the OCC library. For instance, this includes the simple function:
Redraw is defined in V3dViewer.hxx as:
Standard_EXPORT void Redraw() const;
V3dViewer.hxx is listed as an external dependency of the OCC project (which produces a C++/CLI DLL).
Standard_Export is defined in Standard_Macro.hxx as:
define Standard_EXPORT __declspec( dllexport )
"DllImport" never appears in this code.
What part if this is considered a "wrapper"?
Is there a discussion somewhere on how to create these wrappers?
I am aware of the difference between statically and dynamically loaded DLLs. DLLImport appears to generate a dynamically loaded reference, while the code above generates a statically loaded one. I can't find anything in my book about C# that addresses how to create a static DLL reference. Can someone point me to such a description?
Thanks in advance,