title: Calling and Passing a DLL variables C++
body: <p>I have a source file file.cpp and within it I need to access a DLL <code>file.dll</code>. Also I need access to the function <code>DoFunction</code> within <code>file.dll</code> and I need to pass it some variables from the <code>file.cpp</code>.</p>
  
  <p>I have:</p>
  
  <pre><code>m_hinstPtiDLL = LoadLibrary("file.dll");
  pGNSI = (PGNSI) GetProcAddress(m_hinstPtiDLL, "DoFunction");
  </code></pre>
  
  <p>I want to be able to pass <code>DoFunction</code> 7 variables and have it return the necessary value.</p>
  
  <p>Thanks in advance</p>