Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.5 KiB

  1. /*****************************************************************************\
  2. * MODULE: iecon.cxx
  3. *
  4. * The module contains class for connections using IE's default configuration
  5. *
  6. * Copyright (C) 1997-1998 Microsoft Corporation
  7. *
  8. * History:
  9. * 07/31/98 Weihaic Created
  10. *
  11. \*****************************************************************************/
  12. #include "precomp.h"
  13. #include "priv.h"
  14. CIEConnection::CIEConnection (
  15. BOOL bSecure,
  16. INTERNET_PORT nServerPort):
  17. CAnyConnection (bSecure, nServerPort, FALSE, AUTH_IE)
  18. {
  19. }
  20. BOOL
  21. CIEConnection::SendRequest(
  22. HINTERNET hReq,
  23. LPCTSTR lpszHdr,
  24. CStream *pStream)
  25. {
  26. static const DWORD dwMaxRetry = 3;
  27. BOOL bRet = FALSE;
  28. DWORD dwRet;
  29. DWORD dwFlags;
  30. DWORD i;
  31. dwFlags = FLAGS_ERROR_UI_FILTER_FOR_ERRORS; //FLAGS_ERROR_UI_FLAGS_NO_UI;
  32. for (i = 0; i < dwMaxRetry; i++ ) {
  33. bRet = CAnyConnection::SendRequest (hReq,
  34. lpszHdr,
  35. pStream);
  36. if (bRet || GetLastError () != ERROR_ACCESS_DENIED) {
  37. break;
  38. }
  39. dwRet = InetInternetErrorDlg(GetDesktopWindow(),
  40. hReq,
  41. ERROR_INTERNET_INCORRECT_PASSWORD ,
  42. dwFlags,
  43. NULL);
  44. if (dwRet != ERROR_INTERNET_FORCE_RETRY) {
  45. SetLastError (ERROR_ACCESS_DENIED);
  46. break;
  47. }
  48. }
  49. return bRet;
  50. }