title: GetProcAddress cannot find my functions
body: <p>I made a DLL with a function named "render()" and I want to load it dynamically to my application, but GetProcAddress cannot find it. Here's the DLL .h:</p>
  
  <pre><code>#ifdef D3D_API_EXPORTS
  #define D3D_API_API __declspec(dllexport)
  #else
  #define D3D_API_API __declspec(dllimport)
  #endif
  
  D3D_API_API void render();
  </code></pre>
  
  <p>And here's DLL .cpp:</p>
  
  <pre><code>#include "stdafx.h"
  #include "D3D_API.h"
  #include &lt;iostream&gt;
  
  D3D_API_API void render()
  {
      std::cout &lt;&lt; "method called." &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>Here's the application that tries to use that function:</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;windows.h&gt;
  #include &lt;iostream&gt;
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      HINSTANCE myDLL = LoadLibrary( L"D3D_API.dll" );
  
      if (myDLL == NULL) {
          std::cerr &lt;&lt; "Loading of D3D_API.dll failed!" &lt;&lt; std::endl;
      }
  
      typedef void (WINAPI *render_t)();
  
      render_t render = (render_t)GetProcAddress( myDLL, "render" );
  
      if (render == NULL) {
          std::cerr &lt;&lt; "render() not found in .dll!" &lt;&lt; std::endl;
      }
      return 0;
  }
  </code></pre>
  
  <p>My goal is to make a 3D engine that supports both D3D and OpenGL through their own .DLLs using a unified API. I looked at the .dll in notepad and there was a string "render".</p>