IAuthenticate::Authenticate (Windows Embedded CE 6.0)
1/6/2010
This method 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 in this parameter, 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 in this parameter, the client should also set phwnd to zero.
Return Value
This method returns one of the values shown in the following table.
Value | Description |
---|---|
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 Microsoft Win32 Internet function. Currently, the user name and password options handle only the Basic authentication scheme.
This method is related to the InternetErrorDlg.
Requirements
Header | urlmon.h, urlmon.idl |
Library | urlmon.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |