IAuthenticateEx::AuthenticateEx method

Supplies authentication support to a URL moniker from a client application.

Internet Explorer 8

 

Syntax


HRESULT AuthenticateEx(
  [out] HWND             *phwnd,
  [out] LPWSTR           *pszUsername,
  [out] LPWSTR           *pszPassword,
  [in]  AUTHENTICATEINFO *pauthinfo
);

Parameters

phwnd [out]

The 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]

The 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]

The 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.

pauthinfo [in]

The address of an AUTHENTICATEINFO structure that provides additional flags for the authentication.

Return value

Returns one of the following values.

Return codeDescription
S_OK

Authentication was successful.

E_ACCESSDENIED

Authentication failed.

E_INVALIDARG

One or more parameters are invalid.

 

Remarks

This method exists because the Authenticate method can contain no additional parameters. This method inherits all behaviors of Authenticate and adds some of its own. Therefore, the Remarks section of Authenticate applies to this method in full.

Relative to the Authenticate method, the IAuthenticateEx::AuthenticateEx method provides the additional parameter pauthinfo. The data in pauthinfo provides additional flags for the authentication.

Examples



HRESULT          hr            ;
HWND            _hwndAuth      ;
LPWSTR          *ppwzUsername  ;
LPWSTR          *ppwzPassword  ;
AUTHENTICATEINFO authinfo      ;

_hwndAuth                 = NULL               ;
IAuthenticateEx *pAuthEx  = NULL               ;
*ppwzUsername             = "Testa"            ;
*ppwzPassword             = "password"         ;
authinfo.dwFlags          = AUTHENTICATEF_PROXY;

hr = pAuthEx->AuthenticateEx( &_hwndAuth, ppwzUsername, ppwzPassword, &authinfo );				
				

Requirements

Minimum supported client

Windows XP with SP2

Minimum supported server

Windows Server 2003

Product

Internet Explorer 8

Header

Urlmon.h

IDL

Urlmon.idl

DLL

Urlmon.dll

See also

IAuthenticateEx

 

 

Show: