LDAP_REFERRAL_CALLBACK (Windows Embedded CE 6.0)
1/6/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 |
---|---|
Called by the run time to dereference a connection that is no longer needed. |
|
Allows the server to request a certificate when establishing a Secure Sockets Layer (SSL) connection. |
|
Determines if there is a cached connection available for use. |
|
Called by the run time if a new connection was created in the course of chasing a referral to a cached function. |
|
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 referralRoutines is the address of the LDAP_REFERRAL_CALLBACK structure 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 |
See Also
Reference
LDAP Structures
ldap_set_option
NOTIFYOFNEWCONNECTION
QUERYFORCONNECTION