title: How do I DllExport a C++ Class for use in a C# Application
body: <p>I have created a C++ Dll project which contains a class "myCppClass" and tried to Dll export it using the following code as described by:
  <a href="http://msdn.microsoft.com/en-us/library/a90k134d(v=vs.80).aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/a90k134d(v=vs.80).aspx</a></p>
  
  <pre><code>class __declspec(dllexport) CExampleExport : //public CObject
  { ... class definition ... };
  </code></pre>
  
  <p>I have omitted the "public CObject" as that requires afx.h and implies it is an MFC Dll.  I am not sure if this is a good thing or not but it differed from the DLL project default settings.</p>
  
  <p>From the above linked documentation I am led to believe that all "public functions and member variables" are available for import.  How do I accomplish this in C#?  Can simply instantiate the class?</p>
  
  <p>Edit: I just realized that the Title of the post may be misleading.  The emphasis should be on DllImport-ing from C# and ensuring that I followed the documentation properly in C++</p>