Export (0) Print
Expand All
Expand Minimize

ldap_conn_from_msg function

The ldap_conn_from_msg function returns the LDAP session handle (connection pointer) for a particular message.

Syntax


LDAP* ldap_conn_from_msg(
  _In_  LDAP *PrimaryConn,
  _In_  LDAPMessage *res
);

Parameters

PrimaryConn [in]

A pointer to the LDAP session handle of the message, if known. If the LDAP session handle for the message is unknown, then NULL may be passed for this parameter provided that the LDAP_OPT_REF_DEREF_CONN_PER_MSG session option had been previously set for the message session.

res [in]

The LDAP message queried. If NULL is passed for this parameter, then the function will respond with a NULL return value.

Return value

The return value is the LDAP session handle (connection pointer) where the message originated from. This function returns NULL if the originating session has closed or if a NULL LDAPMessage pointer is passed to the function and the LDAP_OPT_REF_DEREF_CONN_PER_MSG session option was not previously set for the message session.

Remarks

This function is used to identify the LDAP session handle associated with the specified LDAP message. It returns a valid LDAP session handle only if one of the following conditions are met:

If neither of these conditions are met, the function returns a NULL session handle.

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

LDAP
LDAPMessage
structures
Establishing an LDAP Session
Functions
ldap_init
ldap_set_option
Return Values

 

 

Show:
© 2014 Microsoft