Supplies authentication support to a URL moniker from a client application.
Syntax
HRESULT Authenticate( HWND *phwnd, LPWSTR *pszUserName, LPWSTR *pszPassword );
Parameters
- phwnd
- [out] Address of a client-provided HWND of the parent window for a default user interface. To prevent a user interface from displaying, the client must provide a user name and password in the other parameters and this handle must be set to zero.
- pszUserName
- [out] Address of a string value that contains the user name to use for authentication. If the client returns a value here, the client should also set phwnd to zero.
- pszPassword
- [out] Address of a string value that contains the password to use for authentication. If the client returns a value here, the client should also set phwnd to zero.
Return Value
Returns one of the following values:
S_OK Authentication was successful. E_ACCESSDENIED Authentication failed. E_INVALIDARG One or more parameters are invalid.
Remarks
Applications that implement the IAuthenticate:Authenticate method must allocate the memory of the pszUserName and pszPassword buffers using CoTaskMemAlloc. Applications that call the IAuthenticate:Authenticate method are responsible for freeing the memory with CoTaskMemFree.
The default user interface can handle any authentication schemes recognized by the Win32® Internet API. Currently, the user name and password options handle only the Basic authentication scheme.
This method is related to the InternetErrorDlg function in the Win32 Internet API. For more information about the Win32 Internet API, see Win32 Internet Functions Overview.
Windows CE
Windows CE Use version 2.12 and later Minimum availability Internet Explorer 4.0