Platform SDK: Active Directory, ADSI, and Directory Services |
The DsMakePasswordCredentials function constructs a credential structure that is suitable for input to the DsBindWithCred function.
DWORD DsMakePasswordCredentials( LPTSTR User, LPTSTR Domain, LPTSTR Password, RPC_AUTH_IDENTITY_HANDLE *pAuthIdentity );
If the function successfully creates a credential, the return value is ERROR_SUCCESS.
A null, default credential may be created if none of the input parameters are present. Otherwise, User must be present. If Domain or Password are null, they default to empty strings (""). The Domain parameter may be null when User is fully qualified, such as a user in UPN format (for example, someone@microsoft.com).
Windows NT/2000: Requires Windows 2000.
Header: Declared in Ntdsapi.h.
Library: Included as a resource in Ntdsapi.dll.
Unicode: Implemented as Unicode and ANSI versions on Windows 2000.
DC and Replication Management Functions, DsBindWithCred, DsFreePasswordCredentials