title: Exporting a C++ Function from a dll without extern "C"
body: <p>Objective: 
  Application should be able to load a dll dynamically using LoadLibrary and call its exported function using GetProcAddress.</p>
  
  <p>My dll class has a function returning a unique_ptr of the class type.</p>
  
  <p>I want to export this function such that the application can call this function using getProcAddress after dll is loaded successfully.</p>
  
  <p>Using extern "C" will not allow to use a C++ class(unique_ptr class template, in this case) in the function signature.</p>
  
  <p>I know, If do not use extern "C", it will export the function ( via __declspec(dllexport) ) with a mangled name.</p>
  
  <p>The client will not know the mangled name during the call to getProcAddress, so how will a client call this function?</p>
  
  <p>Is there a way to export such a function?</p>