public unsafe void SetPasswordPolicy(DomainPasswordPolicy policy)
        {
            DomainPasswordInformation info = new DomainPasswordInformation
            {
                MinPasswordLength     = policy.MinPasswordLength,
                PasswordHistoryLength = policy.PasswordHistoryLength,
                PasswordProperties    = policy.PasswordProperties,
                MaxPasswordAge        = -policy.MaxPasswordAge.Ticks,
                MinPasswordAge        = -policy.MinPasswordAge.Ticks
            };

            this.SetInformation(DomainInformationClass.DomainPasswordInformation, new IntPtr(&info));
        }
        public void SetPasswordPolicy(DomainPasswordPolicy policy)
        {
            unsafe
            {
                DomainPasswordInformation info = new DomainPasswordInformation();

                info.MinPasswordLength     = policy.MinPasswordLength;
                info.PasswordHistoryLength = policy.PasswordHistoryLength;
                info.PasswordProperties    = policy.PasswordProperties;
                info.MaxPasswordAge        = -policy.MaxPasswordAge.Ticks;
                info.MinPasswordAge        = -policy.MinPasswordAge.Ticks;

                this.SetInformation(DomainInformationClass.DomainPasswordInformation, new IntPtr(&info));
            }
        }