This function is called by WinInet whenever an event requiring user input occurs.
DWORD IsDialogBoxHandled( HWND hWnd, DWORD dwError, LPVOID lpParam)
Parameters
- hWnd
[in] Handle to the parent window of the dialog box. - dwError
[in] Specifies the code for the error that requires a response from the user. - lpParam
[in, out] Specific information about the error code. See Remarks for more information.
Return Values
The IsDialogBoxHandled function should return one of the following values:
- ERROR_SUCCESS if the function completed successfully.
- ERROR_CANCELLED if the function failed or was cancelled.
- ERROR_CALL_NOT_IMPLEMENTED to instruct WinInet to use the default message box.
Remarks
The following table shows the WinInet error codes set in dwError and corresponding dialog box messages and lpParam values.
| Error/dwError value | Default Dialog Box | lpParam value |
|---|---|---|
| 0 | Prompts a user to go online. The user has been working offline with a cached page. | NULL |
| ERROR_INTERNET_INCORRECT_PASSWORD | Indicates that the operation requires authentication and the correct password was not supplied. | Pointer to an InvalidPassType structure. This is an internal WinInet structure that has the following signature:
|
| ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION_EX |
Prompts a user to accept cookie or cancel the operation. | Pointer to a COOKIE_DLG_INFO structure. This is an internal WinInet structure that has the following signature:
Possible values for the dwOperation member are: |
| ERROR_INTERNET_SEC_CERT_CN_INVALID | The host name in the certificate is invalid or does not match. Prompts a user to continue or cancel. | Pointer to ERRORINFODLGTYPE structure. This is an internal WinInet structure that has the following signature:
dwDlgFlags=(DLG_FLAGS_CAN_HAVE_CERT_INFO | DLG_FLAGS_IGNORE_CERT_CN_INVALID) dwDlgId=IDD_BAD_CN |
| ERROR_INTERNET_SEC_CERT_DATE_INVALID | The date in the certificate is invalid or has expired. Prompts a user to continue or cancel. | Pointer to ERRORINFODLGTYPE structure. This is an internal WinInet structure that has the following signature:
dwDlgFlags=DLG_FLAGS_CAN_HAVE_CERT_INFO | DLG_FLAGS_IGNORE_CERT_DATE_INVALID) dwDlgId=IDD_CERT_EXPIRED |
| ERROR_INTERNET_MIXED_SECURITY | There is a mixture of secure and non-secure connections. Prompts a user to continue or cancel. | NULL |
| ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR | The nonsecure URL is being redirected to a secure URL. Prompts a user to continue or cancel. | NULL |
| ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR | The secure URL is being redirected to a nonsecure URL. Prompts a user to continue or cancel. | NULL |
| ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION | Prompts the user to confirm the HTTP redirect request. | NULL |
| ERROR_INTERNET_POST_IS_NON_SECURE | Data will be posted on a non-secure connection. Prompts a user to continue or cancel. | NULL |
| ERROR_INTERNET_CHG_POST_IS_NON_SECURE | Indicates that the system is changing to non-secure post. | NULL |
| ERROR_INTERNET_INVALID_CA | The certificate authority is invalid or incorrect. Prompts a user to continue or cancel. | Pointer to ERRORINFODLGTYPE structure. This is an internal WinInet structure that has the following signature:
dwDlgFlags=DLG_FLAGS_CAN_HAVE_CERT_INFO | DLG_FLAGS_IGNORE_INVALID_CA) dwDlgId=IDD_INVALID_CA |
| ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED | A certificate is required to complete client authentication. Prompts a user to continue or cancel. | NULL |
| ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT | Not used. Called internally when the download of the proxy auto-configuration script file fails. | NULL |
| ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR | Indicates that the operation must be retried because of a security zone check. | NULL |
| ERROR_INTERNET_SEC_CERT_ERRORS | The security certificate contained errors. Prompts a user to continue or cancel. | Pointer to ERRORINFODLGTYPE structure. This is an internal WinInet structure that has the following signature:
If the InternetSetOption sets INTERNET_OPTION_ERROR_MASK and passes the INTERNET_ERROR_MASK_COMBINED_SEC_CERT flag, then: dwDlgFlags=DLG_FLAGS_CAN_HAVE_CERT_INFO. dwDlgId=IDD_SEC_CERT_ERRORS. |
| ERROR_INTERNET_SEC_CERT_REV_FAILED | Revocation information for the security certificate for this site is not available. Prompts a user to continue or cancel. | Pointer to ERRORINFODLGTYPE structure. This is an internal WinInet structure that has the following signature:
dwDlgFlags=DLG_FLAGS_CAN_HAVE_CERT_INFO. dwDlgId=IDD_REVOCATION_PROBLEM. |
Requirements
OS Versions: Windows CE .NET 4.2 and later.
Header: Wininetui.h.
Link Library: Wininetui.lib.
See Also
WinInet OS Design Development | Replacement of the WinInet User Interface | IsMessageBoxHandled Callback Function
Send Feedback on this topic to the authors