Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This structure is used to implement external caching of connections.

Syntax

typedef struct LdapReferralCallback {
  ULONG 
SizeOfCallbacks;
  QUERYFORCONNECTION* 
QueryForConnection;
  NOTIFYOFNEWCONNECTION* 
NotifyRoutine;
  DEREFERENCECONNECTION* 
DereferenceRoutine;
} LDAP_REFERRAL_CALLBACK, *PLDAP_REFERRAL_CALLBACK;

Members

SizeOfCallbacks

Specifies the amount of memory needed for the callback mechanism. Set this field to sizeof(LDAP_REFERRAL_CALLBACK).

QueryForConnection

Pointer to a callback function to determine whether there is a cached connection available.

NotifyRoutine

Pointer to a callback function that determines whether a newly created connection will be cached or destroyed after the operation has been completed.

DereferenceRoutine

Pointer to a callback function to dereference a connection that is not in use.

Remarks

Use this structure to implement a mechanism for caching connections. The following table shows possible callback functions for the structure that you can implement in your client code.

Callback function Description

DEREFERENCECONNECTION

Called by the run time to dereference a connection that is no longer needed.

QUERYCLIENTCERT

Allows the server to request a certificate when establishing a Secure Sockets Layer (SSL) connection.

QUERYFORCONNECTION

Determines if there is a cached connection available for use.

NOTIFYOFNEWCONNECTION

Called by the run time if a new connection was created in the course of chasing a referral to a cached function.

VERIFYSERVERCERT

Passes a certificate from the server to the client.

To configure a session to use callbacks to obtain a cached connection, call ldap_set_option(conn, LDAP_OPT_REFERRAL_CALLBACK, &referralRoutines), where referralRoutinesis the address of the LDAP_REFERRAL_CALLBACKstructure that contains your routines. The addresses may be NULL, in which case the LDAP run time will not make the calls.

Requirements

Header winldap.h
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also