Directory Services


The DsFreePasswordCredentials function frees memory allocated for a credentials structure by the DsMakePasswordCredentials function.

void DsFreePasswordCredentials(


[in] Handle of the credential structure to be freed.

Return Values

This function has no return values.


When the handle in AuthIdentitity is passed to DsBindWithCred, DsUnbind must be called before freeing this handle. The normal sequence of events is:

  1. Call DsMakePasswordCredentials to obtain the credential handle.
  2. Call DsBindWithCred, passing the credential handle.
  3. Call DsUnbind when the RPC connection is no longer required.
  4. Call DsFreePasswordCredentials to free the credential handle.


Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Ntdsapi.h.
Library: Use Ntdsapi.lib.

See Also

DsMakePasswordCredentials, DsBindWithCred, DsUnbind, Domain Controller and Replication Management Functions