QUERYFORCONNECTION (Compact 2013)

3/26/2014

This callback function is an application-defined function. This client-side function determines whether there is a cached connection available for use. The QUERYFORCONNECTION name for this function is a placeholder for the function name defined by the application.

Syntax

typedef ULONG (_cdecl QUERYFORCONNECTION)(
  PLDAP PrimaryConnection,
  PLDAP ReferralFromConnection,
  PWCHAR NewDN,
  PCHAR HostName,
  ULONG PortNumber,
  PVOID SecAuthIdentity,
  PVOID CurrentUserToken,
  PLDAP* ConnectionToUse
);

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.
  • 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.
  • CurrentUserToken
    [in] Pointer to the LUID of the current user.
  • ConnectionToUse
    [out] Pointer to the connection to use. This parameter is set to NULL, if there is no connection cached that can be used.

Return Value

The return values are user-defined.

Remarks

If a connection is available, this function should return a pointer to the connection to use in the ConnectionToUseparameter. If no connection is available, the function should set the ConnectionToUse parameter to NULL.

Requirements

Header

winldap.h

Library

wldap32.lib

See Also

Reference

LDAP Callback Functions