title: C++ DLL Export: Decorated/Mangled names
body: <p>Created basic C++ DLL and exported names using Module Definition file (MyDLL.def).
  After compilation I check the exported function names using <code>dumpbin.exe</code>
  I expect to see:</p>
  
  <pre><code>SomeFunction
  </code></pre>
  
  <p>but I see this instead:</p>
  
  <pre><code>SomeFunction = SomeFunction@@@23mangledstuff#@@@@
  </code></pre>
  
  <p>Why?</p>
  
  <p>The exported function appears undecorated (especially compared to not using the Module Def file), but what's up with the other stuff? </p>
  
  <p>If I use <code>dumpbin.exe</code> against a DLL from any commercial application, you get the clean:</p>
  
  <pre><code>SomeFunction
  </code></pre>
  
  <p>and nothing else...</p>
  
  <p>I also tried removing the Module Definition and exporting the names using the "C" style of export, namely:</p>
  
  <pre><code>extern "C" void __declspec(dllexport) SomeFunction();
  </code></pre>
  
  <p>(Simply using "extern "C" did not create an exported function)</p>
  
  <p>However, this still creates the same output, namely:</p>
  
  <pre><code>SomeFunction = SomeFunction@@@23mangledstuff#@@@@
  </code></pre>
  
  <p>I also tried the <code>#define dllexport __declspec(dllexport)</code> option and created a LIB with no problem. However, I don't want to have to provide a LIB file to people using the DLL in their C# application. </p>
  
  <p>It's a plain vanilla C++ DLL (unmanaged code), compiled with C++ nothing but a simple header and code. Without Module Def I get mangled exported functions (I can create a static library and use the LIB no problem. I'm trying to avoid that). If I use <code>extern "C" __declspec(dllexport)</code> <em>OR</em> a Module Definition I get what appears to be an undecorated function name... the only problem is that it is followed by an "=" and what looks like a decorated version of the function. I want to get rid of the stuff after the "=" - or at least understand why it is there. </p>
  
  <p>As it stands, I'm pretty certain that I can call the function from C# using a P/Invoke... I just want to avoid that junk at the end of the "=". </p>
  
  <p>I'm open to suggestions on how to change the project/compiler settings, but I just used the standard Visual Studio DLL template - nothing special. </p>