Esempio n. 1
0
        public static UNICODE_STRING ToUnicodeString(this string s)
        {
            ushort         length         = (ushort)(s.Length * 2);
            ushort         maximumlength  = (ushort)(length + 2);
            UNICODE_STRING unicode_string = new UNICODE_STRING();

            unicode_string.Buffer        = Marshal.StringToHGlobalUni(s);
            unicode_string.Length        = length;
            unicode_string.MaximumLength = maximumlength;
            return(unicode_string);
        }
Esempio n. 2
0
 public static extern bool PasswordFilter(
     ref UNICODE_STRING UserName,
     ref UNICODE_STRING FullName,
     ref UNICODE_STRING Password,
     bool SetOperation
     );