private void ProcessCallBackRoutine(System.DirectoryServices.Protocols.ReferralCallback tempCallback) { LdapReferralCallback outValue = new LdapReferralCallback { sizeofcallback = Marshal.SizeOf(typeof(LdapReferralCallback)), query = (tempCallback.QueryForConnection == null) ? null : this.queryDelegate, notify = (tempCallback.NotifyNewConnection == null) ? null : this.notifiyDelegate, dereference = (tempCallback.DereferenceConnection == null) ? null : this.dereferenceDelegate }; ErrorChecking.CheckAndSetLdapError(Wldap32.ldap_set_option_referral(this.connection.ldapHandle, LdapOption.LDAP_OPT_REFERRAL_CALLBACK, ref outValue)); }
private void ProcessCallBackRoutine(ReferralCallback tempCallback) { LdapReferralCallback value = new LdapReferralCallback(); value.sizeofcallback = Marshal.SizeOf(typeof(LdapReferralCallback)); value.query = tempCallback.QueryForConnection == null ? null : _queryDelegate; value.notify = tempCallback.NotifyNewConnection == null ? null : _notifiyDelegate; value.dereference = tempCallback.DereferenceConnection == null ? null : _dereferenceDelegate; int error = Wldap32.ldap_set_option_referral(_connection.ldapHandle, LdapOption.LDAP_OPT_REFERRAL_CALLBACK, ref value); ErrorChecking.CheckAndSetLdapError(error); }
private void ProcessCallBackRoutine(ReferralCallback tempCallback) { QUERYFORCONNECTIONInternal qUERYFORCONNECTIONInternal; NOTIFYOFNEWCONNECTIONInternal nOTIFYOFNEWCONNECTIONInternal; DEREFERENCECONNECTIONInternal dEREFERENCECONNECTIONInternal; LdapReferralCallback ldapReferralCallback = new LdapReferralCallback(); ldapReferralCallback.sizeofcallback = Marshal.SizeOf(typeof(LdapReferralCallback)); LdapReferralCallback ldapReferralCallbackPointer = ldapReferralCallback; if (tempCallback.QueryForConnection == null) { qUERYFORCONNECTIONInternal = null; } else { qUERYFORCONNECTIONInternal = this.queryDelegate; } ldapReferralCallbackPointer.query = qUERYFORCONNECTIONInternal; LdapReferralCallback ldapReferralCallbackPointer1 = ldapReferralCallback; if (tempCallback.NotifyNewConnection == null) { nOTIFYOFNEWCONNECTIONInternal = null; } else { nOTIFYOFNEWCONNECTIONInternal = this.notifiyDelegate; } ldapReferralCallbackPointer1.notify = nOTIFYOFNEWCONNECTIONInternal; LdapReferralCallback ldapReferralCallbackPointer2 = ldapReferralCallback; if (tempCallback.DereferenceConnection == null) { dEREFERENCECONNECTIONInternal = null; } else { dEREFERENCECONNECTIONInternal = this.dereferenceDelegate; } ldapReferralCallbackPointer2.dereference = dEREFERENCECONNECTIONInternal; int num = Wldap32.ldap_set_option_referral(this.connection.ldapHandle, LdapOption.LDAP_OPT_REFERRAL_CALLBACK, ref ldapReferralCallback); ErrorChecking.CheckAndSetLdapError(num); }
internal static int SetReferralOption(ConnectionHandle ldapHandle, LdapOption option, ref LdapReferralCallback outValue) => Interop.Ldap.ldap_set_option_referral(ldapHandle, option, ref outValue);
public static extern int ldap_set_option_referral([In] ConnectionHandle ldapHandle, [In] LdapOption option, ref LdapReferralCallback outValue);