IWMCredentialCallback::AcquireCredentials method

The AcquireCredentials method acquires the credentials of the user, to verify that the user has permission to access a remote site.

Syntax


HRESULT AcquireCredentials(
  [in]      WCHAR   *pwszRealm,
  [in]      WCHAR   *pwszSite,
  [in, out] WCHAR   *pwszUser,
  [in]      DWORD   cchUser,
  [in, out] WCHAR   *pwszPassword,
  [in]      DWORD   cchPassword,
  [in]      HRESULT hrStatus,
  [in, out] DWORD   *pdwFlags
);

Parameters

pwszRealm [in]

Pointer to a wide-character null-terminated string that contains the name of the realm.

pwszSite [in]

Pointer to a wide-character null-terminated string containing the name of the site. The site is the name of the remote server.

pwszUser [in, out]

Pointer to a buffer for the user name. The application should copy the user name into this buffer. When this method is first called, the buffer is empty. If the method is called again — for example, if the user typed his or her credentials incorrectly — the buffer may contain the name from the previous invocation.

cchUser [in]

Specifies the size of the pwszUser buffer, in number of wide characters.

pwszPassword [in, out]

Pointer to a buffer for the password. The application should copy the user's password into this buffer.

cchPassword [in]

Specifies the size of the pwszPassword buffer, in number of wide characters.

hrStatus [in]

Specifies an HRESULT return code.

pdwFlags [in, out]

Pointer to a DWORD containing a bitwise OR of zero or more flags from the WMT_CREDENTIAL_FLAGS enumeration type. On input, the caller sets whichever flags are relevant. On output, the application should clear the flags that were set by the caller, and set any additional flags, as appropriate. For details, see WMT_CREDENTIAL_FLAGS.

Return value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

This method is used when a request for a remote URL requires authentication.

The reader object calls the AcquireCredentials method on the application to retrieve the user name and password of the user.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Version

Windows Media Format 7 SDK, or later versions of the SDK

Header

Wmsdkidl.h (include Wmsdk.h)

See also

Authentication
IWMCredentialCallback Interface

 

 

Show: