title: Integrated Windows Authentication Wininet
body: <p>Hi experts
  I need to send an http request from C++ application using wininet API. 
  User is behind ISA proxy server that is configured to use Integrated Windows Authentication. 
  When I get error 407 (proxy authentication required) I use InternetErrorDlg to ask the user for credentials. This is not an ideal solution as the IE is able to use current user's credentials transparently. Is there a way to do this ?</p>
  
  <p>Sample code for request</p>
  
  <pre><code>hRequest = HttpOpenRequest ( 
      hConnect, 
      "POST", 
      query.c_str(), 
      HTTP_VERSION, 
      NULL, 
      cAcceptTypes, 
      INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE| INTERNET_FLAG_KEEP_CONNECTION,
      0);
  
  bRet = HttpSendRequest(
                  hRequest,
                  NULL,
                  0,
                  (LPVOID)dataXml.c_str(),
                  (DWORD)dataXml.length());
  
  bRet = HttpQueryInfo(
                  hRequest,
                  HTTP_QUERY_FLAG_NUMBER | HTTP_QUERY_STATUS_CODE,
                  &amp;dwStatus,
                  &amp;dwSize,
                  NULL);
  
  
  if (dwStatus == HTTP_STATUS_PROXY_AUTH_REQ)
  {
  
      ProxyAuthenticate( hRequest );  // Here I call InternetErrorDlg
              bRet = HttpSendRequest(
                  hRequest,
                  NULL,
                  0,
                  (LPVOID)dataXml.c_str(),
                  (DWORD)dataXml.length());
  </code></pre>
  
  <p>}</p>