title: How do I call C++/CLI (.NET) DLLs from standard, unmanaged non-.NET applications?
body: <p>In the unmanaged world, I was able to write a __declspec(dllexport) or, alternatively, use a .DEF file to expose a function to be able to call a DLL.  (Because of name mangling in C++ for the __stdcall, I put aliases into the .DEF file so certain applications could re-use certain exported DLL functions.)  Now, I am interested in being able to expose a single entry-point function from a .NET assembly, in unmanaged-fashion, but have it enter into .NET-style functions within the DLL.  Is this possible, in a simple and straight-forward fashion?</p>
  
  <p>What I have is a third-party program that I have extended through DLLs (plugins) that implement some complex mathematics.  However, the third-party program has no means for me to visualize the calculations.  I want to somehow take these pre-written math functions, compile them into a separate DLL (but using C++/CLI in .NET), but then add hooks to the functions so I can render what's going on under the hood in a .NET user control.  I'm not sure how to blend the .NET stuff with the unmanaged stuff, or what to Google to accomplish this task.</p>
  
  <p>Specific suggestions with regard to the managed/unmanaged bridge, or alternative methods to accomplish the rendering in the manner I have described would be helpful.  Thank you.</p>