Ejemplo n.º 1
0
        public static WlanHostedNetworkReason SetSecondaryKey(byte[] passKey, bool isPersistent = true)
        {
            WlanHostedNetworkReason failReason;

            Helper.ThrowExceptionForHR(WlanNativeMethods.WlanHostedNetworkSetSecondaryKey(wlanHandle,
                                                                                          32, passKey, false, isPersistent, out failReason, IntPtr.Zero));
            return(failReason);
        }
Ejemplo n.º 2
0
        public static WlanHostedNetworkReason SetSecondaryKey(string passKey, bool isPersistent = true)
        {
            WlanHostedNetworkReason failReason;

            Helper.ThrowExceptionForHR(WlanNativeMethods.WlanHostedNetworkSetSecondaryKey(wlanHandle,
                                                                                          (uint)(passKey.Length + 1), Encoding.Default.GetBytes(passKey), true, isPersistent, out failReason,
                                                                                          IntPtr.Zero));
            return(failReason);
        }