title: Can't compile a C++ program with _beginthreadex
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;Windows.h&gt;
  #include &lt;process.h&gt;
  
  //#include "windowstate.cpp"
  
  //DWORD WINAPI MyThreadFunction( LPVOID lpParam );
  
  
  using namespace std;
  
  int Zeit;
  
  unsigned int __stdcall wfshutdown() {
      Sleep(Zeit*60000);
      system("shutdown -s -t 2");
      return 0;
  }
  
  
  void shutdown() {
      cout &lt;&lt; "When I should shut down your PC(in minutes)" &lt;&lt; endl;
      cin &gt;&gt; Zeit;
      if(Zeit==0) {
          return;
      }
  //  windowstate(0);
  
  
      HANDLE hThread;
      DWORD threadID;
      hThread = (HANDLE)_beginthreadex( NULL, 0, &amp;wfshutdown, NULL, 0, &amp;threadID );
  }
  </code></pre>
  
  <p>I cannot run that program. I get this error, which I do not understand:</p>
  
  <blockquote>
    <p>Error  1 error C2664: '_beginthreadex' : cannot convert parameter 3 from 'unsigned int (__stdcall *)(void)' to 'unsigned int (__stdcall *)(void *)'32</p>
  </blockquote>
  
  <p>I unseccessfully searched the web for more than an hour to find a solution,
  therefore I hope very much that you can help.</p>