Share via


NOTIFYOFNEWCONNECTION (Compact 2013)

3/26/2014

This callback function is an application-defined function. The run time calls this function if a new connection was created in the course of chasing a referral. The NOTIFYOFNEWCONNECTION name for this function is a placeholder for the function name defined by the application.the

Syntax

typedef BOOLEAN (_cdecl NOTIFYOFNEWCONNECTION) (
  PLDAP PrimaryConnection,
  PLDAP ReferralFromConnection,
  PWCHAR NewDN,
  PCHAR HostName,
  PLDAP NewConnection,
  ULONG PortNumber,
  PVOID SecAuthIdentity,
  PVOID CurrentUser,
  ULONG ErrorCodeFromBind
);

Parameters

  • PrimaryConnection
    [in] Specifies the primary connection.
  • ReferralFromConnection
    [in] Specifies the connection, which provided the referral.
  • NewDN
    [in] Specifies the distinguished name (DN) of the desired entry in the referred server.
  • HostName
    [in] Specifies the name of the referred server.
  • NewConnection
    [in] Specifies the new connection that was created in the course of chasing a referral.
  • PortNumber
    [in] Specifies the port number on which to connect.
  • SecAuthIdentity
    [in] Specifies the credentials to pass to the referred server. If this parameter is NULL, use the CurrentUserToken parameter instead.
  • CurrentUser
    Pointer to the LUID of the current user.
  • ErrorCodeFromBind
    [out] Error code from the bind operation. If equal to Null, the bind operation was successful, if not equal to Null, the bind operation failed.

Return Value

The return values are user-defined.

Remarks

This function should return FALSE if it does not want to cache the connection. When FALSE is returned, the connection will be destroyed once the operation is complete. The function should return TRUE if it has taken ownership of the connection and the connection will be cached.

Note

Any new connections so created inherit the current callbacks from the primary connection on which the request was initiated.

Requirements

Header

winldap.h

Library

wldap32.lib

See Also

Reference

LDAP Callback Functions