Directory Services

DsSetAuthIdentity

The DsSetAuthIdentity function sets the security context under which the directory backup APIs are called.

HRESULT DsSetAuthIdentity(
  LPCTSTR szUserName,
  LPCTSTR szDomainName,
  LPCTSTR szPassword
);

Parameters

szUserName
[in] The null-terminated string that specifies the user name.
szDomainName
[in] The null-terminated string that specifies the name of the domain that the user belongs to.
szPassword
[in] The null-terminated string that specifies the password of the user in the specified domain.

Return Values

One of the standard HRESULT success codes; otherwise, a failure code.

Remarks

If DsSetAuthIdentity is not called, security context of the current process is assumed.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Unicode: Implemented as Unicode and ANSI versions.
Header: Declared in Ntdsbcli.h.
Library: Use Ntdsbcli.lib.

See Also

Backing Up and Restoring Active Directory, Directory Backup Functions