title: How do I use the LoadLibrary function to import a dll file and use functions from dll file?
body: <h2>Question</h2>
  
  <p>I would like to make a c++ file that simply calls the one function in the .dll file that I need and returns the value.  However, I have been trying to use LoadLibrary() to no success at all. When I hover over LoadLibrary, it says "identifier "LoadLibrary" is undefined".  I figured that importing windows.h and winbase.h should be enough to define the library...</p>
  
  <pre><code>#pragma once
  #include &lt;windows.h&gt;
  #include &lt;iostream&gt;
  #include &lt;WinBase.h&gt;
  #include &lt;E:\Users\Zachary\Anaconda3\include\Python.h&gt;
  
  int main()
  {
      HINSTANCE dll = LoadLibrary("cbw64.dll");
  }
  </code></pre>
  
  <h2>More details about my project design</h2>
  
  <p>I am currently working on a senior design project where I have to connect to an OM-USB-TC Data acquisition unit from Omega.  Ultimately, all I need to do is get temperature data from this unit and give it to python to do some cool graphing stuff. However, I do not have any communication protocol for this daq as the company is loath to give it out. So, I have to use the universal library that they have provided.  </p>
  
  <p>To use the library, I need to import a .dll file.  However, it's tricky for python to use this as the temperature data is stored in an in-out variable for programming in c, and it seems like python doesn't play well with in-out variables. </p>