title: invalid cast from void(WINAPI*)(...) to LPVOID
body: <p>i'm trying to use this code [RasDialAsync.c] (<a href="https://github.com/pauldotknopf/WindowsSDK7-Samples/blob/master/netds/ras/rasdialasync/RasDialAsync.c" rel="nofollow noreferrer">https://github.com/pauldotknopf/WindowsSDK7-Samples/blob/master/netds/ras/rasdialasync/RasDialAsync.c</a>) inside QT , i have only one error that i can't figure it out . what is this ? how can i fix this ? here is the function header : 
  <Br>My RasDialFunc function : </p>
  
  <pre><code>void WINAPI RasDialFunc(UINT unMsg,
                      RASCONNSTATE rasconnstate,
                      DWORD dwError )
  </code></pre>
  
  <p><br>
  and here is part of my codes : </p>
  
  <pre><code>LPRASDIALPARAMS lpRasDialParams = NULL;   // Structure to store the RasDial parameters
  HRASCONN        hRasConn = NULL;          // Handle to RAS connection
  DWORD           nRet = 0;                 // Return value from a function
  lpRasDialParams = (LPRASDIALPARAMS) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RASDIALPARAMS));
  if (NULL == lpRasDialParams)
  {
      qDebug() &lt;&lt; "HeapAlloc failed\n";
  }
  lpRasDialParams-&gt;dwSize =sizeof(RASDIALPARAMS);
  StringCchCopy(lpRasDialParams-&gt;szEntryName, CELEMS(lpRasDialParams-&gt;szEntryName), rasConn);
  StringCchCopy(lpRasDialParams-&gt;szUserName, CELEMS(lpRasDialParams-&gt;szUserName), username);
  StringCchCopy(lpRasDialParams-&gt;szPassword, CELEMS(lpRasDialParams-&gt;szPassword), password);
  
  hRasConn = NULL;
  nRet = RasDial(NULL, NULL, lpRasDialParams, 0,&amp;RasDialFunc, &amp;hRasConn);
  if (nRet != 0)
  </code></pre>
  
  <p><br>
  and here is the error <br></p>
  
  <pre><code>main.cpp:202: error: invalid conversion from 'void (__attribute__((__stdcall__)) *)(UINT, tagRASCONNSTATE, DWORD) {aka void (__attribute__((__stdcall__)) *)(unsigned int, tagRASCONNSTATE, long unsigned int)}' to 'LPVOID {aka void*}' [-fpermissive]
       nRet = RasDial(NULL, NULL, lpRasDialParams, 0,&amp;RasDialFunc, &amp;hRasConn);
                                                                            ^
  </code></pre>