title: Difference between dllexport vs dllimport
body: <p>I've searched through some Microsoft tutorials and all related stackoverflow threads to find the right answer. None of them is clear enough for me.</p>
  
  <p><a href="https://stackoverflow.com/questions/57999/what-is-the-difference-between-dllexport-and-dllimport">This thread</a> still leaves some doubt.</p>
  
  <p><em>"__declspec( dllexport ) - The class or function so tagged will be exported from the DLL it is built in"</em> </p>
  
  <p>vs.</p>
  
  <p><em>"__declspec( dllimport ) - The class or function so tagged will be imported from a DLL"</em></p>
  
  <p>Well, it hardly makes sense, because what does it mean "import from DLL" and "export from DLL". You can either <strong>export from</strong> and <strong>import to</strong> something, or <strong>import from</strong> and <strong>export to</strong> something.</p>
  
  <p>My understanding is:
  dllexport is used to specify that I want to load this code to the DLL I'm creating, whereas dllimport is used to tell the compiler that I'd like to make use of code from a DLL.</p>
  
  <p>Is that correct?</p>