Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

ldap_unbind function

The ldap_unbind function frees resources associated with an LDAP session.

Syntax


ULONG ldap_unbind(
  _In_  LDAP *ld
);

Parameters

ld [in]

The session handle.

Return value

If the function succeeds, the return value is LDAP_SUCCESS.

If the function fails, it returns an error code. For more information, see Return Values.

Remarks

Call ldap_unbind to unbind from the directory, close the connection, and dispose of the session handle. Call this function when you have finished with an LDAP connection structure, even if you have not called ldap_bind when opening the connection. Ensure that you do not inadvertently call this function more than once on a session handle because doing so can free resources that you did not intend to release.

The ldap_unbind function is for the asynchronous set of APIs, but it completes synchronously. There is no server response to an unbind operation.

Multithreading: Calls to ldap_unbind are safe, but you cannot use the session handle to the LDAP structure after it has been freed.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winldap.h

Library

Wldap32.lib

DLL

Wldap32.dll

See also

Functions
LDAP
ldap_bind
ldap_unbind_s
Return Values

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.