title: C++ WinInet no second request
body: <p>I'm currently coding a website watcher, witch calls every minute a website and parses the new threads. Because I only need the HTTP I just used the WinInet-API. Everything works, but than I saw that the second request (and following requests) is always empty. Also the forum/site doesn't log a second visit.
  I have no clue what happened. I set no cache and I'm closing everything at the end.</p>
  
  <p>The code is:</p>
  
  <pre><code>char *getRequest(wchar_t *url)
  {
      HINTERNET hInet = InternetOpen(L"MyBrowser", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
      if (!hInet)
      {
          processError(L"Error getRequest 1");
          return 0;
      }
      HINTERNET hUrl = InternetOpenUrl(hInet, url, NULL, 0, INTERNET_FLAG_PRAGMA_NOCACHE, 0);
      if (!hUrl)
      {
          processError(L"Error getRequest 2");
          InternetCloseHandle(hInet);
          return 0;
      }
      DWORD dwNumberOfBytesRead = 0;
      char *ret = (char*)LocalAlloc(LMEM_ZEROINIT, 4096);
      if (!InternetReadFile(hUrl, ret, 4096, &amp;dwNumberOfBytesRead))
      {
          processError(L"Error getRequest 3");
          InternetCloseHandle(hUrl);
          InternetCloseHandle(hInet);
          LocalFree(ret);
          return 0;
      }
      InternetCloseHandle(hUrl);
      InternetCloseHandle(hInet);
      return ret;
  }
  </code></pre>
  
  <p>At wireshark there is no connection too.
  Thank you!</p>