Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Workshop  |  Networking, Protocols & Data Formats

InternetErrorDlg Function


Displays a dialog box for the error that is passed to InternetErrorDlg, if an appropriate dialog box exists. If the FLAGS_ERROR_UI_FILTER_FOR_ERRORS flag is used, the function also checks the headers for any hidden errors and displays a dialog box if needed.

Syntax

DWORD InternetErrorDlg(
    IN HWND hWnd,
    IN OUT HINTERNET hRequest,
    IN DWORD dwError,
    IN DWORD dwFlags,
    IN OUT LPVOID *lppvData
);

Parameters

hWnd
Handle to the parent window for any needed dialog box. This parameter can be NULL if no dialog box is needed.
hRequest
HINTERNET handle to the Internet connection used in the call to HttpSendRequest.
dwError
Error value for which to display a dialog box. Can be one of the following values:
ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR
Notifies the user of the zone crossing to and from a secure site.
ERROR_INTERNET_INCORRECT_PASSWORD
Displays a dialog box for obtaining the user's name and password. (On Microsoft Windows® 95, the function first attempts to use any cached authentication information for the server being accessed, before displaying a dialog box.)
ERROR_INTERNET_INVALID_CA
Notifies the user that the Win32® Internet function does not recognize the certificate authority that generated the certificate for this Secure Sockets Layer (SSL) site.
ERROR_INTERNET_POST_IS_NON_SECURE
Displays a warning about posting data to the server through a nonsecure connection.
ERROR_INTERNET_SEC_CERT_CN_INVALID
Indicates that the SSL certificate Common Name (hostname field) is incorrect. Displays an Invalid SSL Common Name dialog box, and lets the user view the incorrect certificate. Also allows the user to select a certificate in response to a server request.
ERROR_INTERNET_SEC_CERT_DATE_INVALID
Tells the user that the SSL certificate has expired.
dwFlags
Unsigned long integer value that contains the action flags. Can be a combination of these values:
FLAGS_ERROR_UI_FILTER_FOR_ERRORS
Scans the returned headers for errors. Call after using HttpSendRequest. This option detects any hidden errors, such as an authentication error.
FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS
If the function succeeds, stores the results of the dialog box in the Internet handle.
FLAGS_ERROR_UI_FLAGS_GENERATE_DATA
Queries the Internet handle for needed information. The function constructs the appropriate data structure for the error. (For example, for Cert CN failures, the function grabs the certificate.)
FLAGS_ERROR_UI_SERIALIZE_DIALOGS
Serializes authentication dialog boxes for concurrent requests on a password cache entry. The lppvData parameter should contain the address of a pointer to an INTERNET_AUTH_NOTIFY_DATA structure, and the client should implement a thread-safe, nonblocking callback function.
lppvData
Address of a data structure. The structure can be different for each error that needs to be handled.

Return Value

Returns one of the following values:

ERROR_SUCCESS The function completed successfully.
ERROR_CANCELLED The function was canceled by the user.
ERROR_INTERNET_FORCE_RETRY The Win32 function needs to redo its request.

Remarks

Authentication errors are hidden, since the call to HttpSendRequest will complete successfully, but the status code would indicate that the proxy or server requires authentication. The FLAGS_ERROR_UI_FILTER_FOR_ERRORS flag causes the function to search the headers for status codes that indicate user input is needed.

Function Information

Windows NT Use version 4.0 and later. Implemented only as an ANSI function.
Windows Use Windows 95 and later. Implemented only as an ANSI function.
Header Wininet.h
Import library Wininet.lib
Minimum availability Internet Explorer 3.0

See Also

Microsoft Win32 Internet Functions Overview, Enabling Internet Functionality, Microsoft Win32 Internet Functions Reference, General Win32 Internet Functions


Does this content meet your programming needs? Write us!

Back to topBack to top

© 1998 Microsoft Corporation. All rights reserved. Terms of use.

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site