title: getProcAddress - NULL is returned
body: <p>I have the following code:</p>
  
  <pre><code>  //mydll.cpp
      #include &lt;Windows.h&gt;
      #include &lt;io.h&gt;
  
      #define STDOUT_FILEDESC 1
  
      class MYSTDOUT {
          bool shouldClose;
          bool isBuffered;
      public:
          MYSTDOUT(bool buf = true, bool cl = true) 
              : isBuffered(buf),
                shouldClose(cl) 
          {}
          ~MYSTDOUT() {
              if (shouldClose) {
                  close(STDOUT_FILEDESC);
              }
          }
      };
  
      __declspec(dllexport) void* mydll_init_stdout()
      {
          static MYSTDOUT outs;
          return &amp;outs;
      }
  //test_dll.cpp
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;Windows.h&gt;
  #include &lt;io.h&gt;
  
  
  typedef void* (__cdecl *MYPROC)(void);
  
  
  int main(void)
  {
    int fd;
    void *pstdout;
  
    MYPROC init_stdout;
    HMODULE handle = LoadLibrary(TEXT("mydll.dll")); 
  
    init_stdout = (MYPROC)GetProcAddress(handle,"mydll_init_stdout");//NULL
  
    FreeLibrary((HMODULE) handle);
    return 0;
  }
  </code></pre>
  
  <p>I get that init_stdout is NULL.What  could be a problem?
  handle is OK(Not NULL)
  Thank you</p>