IsDialogBoxHandled Callback Function (WinInet)

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: {LPSTR lpszRealm;
LPSTR lpszUsername;
LPSTR lpszPassword;
LPSTR lpszHost;
ULONG ulMaxField;
BOOL fIsProxy;
AuthType eAuthType;
}
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:
{LPWSTR pszServer;
PINTERNET_COOKIE pic;
DWORD dwStopWarning;
INT cx;
INT cy;
LPWSTR pszHeader;
DWORD dwOperation;
} 

Possible values for the dwOperation member are:
COOKIE_OP_SET (0x01)
COOKIE_OP_MODIFY (0x02)
COOKIE_OP_GET (0x04)
COOKIE_OP_SESSION (0x08)
COOKIE_OP_PERSISTENT (0x10)
COOKIE_OP_3RD_PARTY (0x20)
Ignore all other members of this structure. They contain values used internally by WinInet.

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. NULL
ERROR_INTERNET_SEC_CERT_DATE_INVALID The date in the certificate is invalid or has expired. Prompts a user to continue or cancel. NULL
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. NULL
ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED A certificate is required to complete client authentication. Prompts a user to continue or cancel. NULL
ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT Not used. Called internally when proxy auto-configuration script has errors. 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_REV_FAILED The revocation of a security certificate failed. Prompts a user to continue or cancel. 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:
{
DWORD  dwDlgFlags,
DWORD  dwDlgId, 
HINTERNET hInternet, 
LPVOID lpVoid;
}
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. NULL

Requirements

OS Versions: Windows CE .NET 4.2 and later.
Header: Wininetui.h.
Link Library: Wininetui.lib.

See Also

Replacing the WinInet User Interface | IsMessageBoxHandled Callback Function

 Last updated on Friday, April 09, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.