Microsoft Windows CE 3.0  

InternetErrorDlg

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function displays a dialog box for the error that is passed to it, 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.

DWORD InternetErrorDlg (
HWND
hWnd
,
HINTERNET
hRequest
,
DWORD
dwError
,
DWORD
dwFlags
,
LPVOID

*
lppvData
);

Parameters

hWnd
[in] Handle to the parent window for any needed dialog box. This parameter can be NULL if no dialog box is needed.
hRequest
[in] [out] HINTERNEThandle to the Internet connection used in the call to HttpSendRequest.
dwError
[in] Error value for which to display a dialog box. Can be one of the following values:
Value Description
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
[in] Unsigned long integer value that contains the action flags. Can be a combination of these values:
Value Description
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 lppvDataparameter 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
[in] [out] Address of a data structure. The structure can be different for each error that needs to be handled.

Return Values

Returns one of the following values:

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

Remarks

Authentication errors are hidden, since the call to HttpSendRequestwill 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.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.12 and later Wininet.h   Wininet.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

HINTERNET, HttpSendRequest