title: How to import a DLL function in C?
body: <p>I was given a DLL that I'm trying to use. The DLL contains the function "send".
  this is what I did:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;Windows.h&gt;
  
  int main(int argc, char * argv[])
  {
      HMODULE libHandle;
  
      if ((libHandle = LoadLibrary(TEXT("SendSMS.dll"))) == NULL)
      {
          printf("load failed\n");
          return 1;
      }
      if (GetProcAddress(libHandle, "send") == NULL)
      {
          printf("GetProcAddress failed\n");
          printf("%d\n", GetLastError());
          return 1;
      }
      return 0;
  }
  </code></pre>
  
  <p>GetProcAddress returns NULL, and the last error value is 127. (procedure was not found)</p>
  
  <p>What am I doing wrong?</p>