Purpose
Displays an error message dialog box.
Displays a dialog box for the error that is passed to MIErrorDlg, if an appropriate dialog box exists. The function also checks the headers of the specified CHttpFile for any hidden errors and displays a dialog box if needed.
Syntax
MIErrorDlg( ByVal hFile As CHttpFile, ByVal dwError As Integer) As Integer
hFile is a CHttpFile handle.
dwError is the error code which is used to get the error message.
Return Value
Returns one of the following values, otherwise returns an error value.
Error Code | Description |
---|---|
ERROR_SUCCESS | The function completed successfully. In the case of authentication this indicates that the user clicked the Cancel button. |
ERROR_CANCELLED | The function was canceled by the user. |
ERROR_INTERNET_FORCE_RETRY | This indicates that the function needs to redo its request. In the case of authentication this indicates that the user clicked the OK button. |
Description
Use this function to get the error message in the form of a dialog box if an appropriate dialog box exists. It also checks the headers for any hidden errors and displays a dialog box if needed. For more information, refer to the Microsoft MSDN library. Allowable error codes are as follows:
Error Code | Description |
---|---|
ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR | Notifies the user of the zero crossing to and from a secure site. |
ERROR_INTERNET_INCORRECT_PASSWORD | Displays a dialog box requesting the user's name and password. |
ERROR_INTERNET_INVALID_CA | Notifies the user that the function does not recognize the certificate authority that generated the certificate for this Secure Socket 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 (host name 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 | Notifies the user that the SSL certificate has expired. |
For more information, refer to the Microsoft MSDN Library.