示例#1
0
 internal static extern int WlanGetSecuritySettings(
     [In] IntPtr hClientHandle,
     [In] WlanSecurableObject SecurableObject,
     [Out, Optional] out WlanOpcodeValueType pValueType,
     [Out] out IntPtr strCurrentSDDL,
     [Out] out WlanAccess pdwGrantedAccess
     );
示例#2
0
文件: WirelessApi.cs 项目: radtek/WCF
 public static extern int WlanGetProfile(
     [In] IntPtr clientHandle,
     [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
     [In, MarshalAs(UnmanagedType.LPWStr)] string profileName,
     [In] IntPtr pReserved,
     [Out] out IntPtr profileXml,
     [Out, Optional] out WlanProfileFlags flags,
     [Out, Optional] out WlanAccess grantedAccess);
示例#3
0
 internal static extern int WlanGetProfile(
     [In] IntPtr hClientHandle,
     [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
     [In, MarshalAs(UnmanagedType.LPWStr)] string strProfileName,
     [In, Out] IntPtr pReserved,
     [Out] out IntPtr strProfileXml,
     [Out, Optional] out WlanProfileFlags dwFlags,
     [Out, Optional] out WlanAccess pdwGrantedAccess
     );
示例#4
0
        /// <summary>
        /// Gets the profile's XML specification. Request Key unencrypted in plaintext.
        /// </summary>
        /// <param name="profileName">The name of the profile.</param>
        /// <returns>The XML document.</returns>
        public string GetProfileXmlUnencrypted(string profileName)
        {
            IntPtr           profileXmlPtr;
            WlanProfileFlags flags  = WlanProfileFlags.GetPlaintextKey;           // | WlanProfileFlags.User;
            WlanAccess       access = WlanAccess.ReadAccess;

            WlanInterop.ThrowIfError(WlanInterop.WlanGetProfile(client.clientHandle, info.interfaceGuid, profileName, IntPtr.Zero, out profileXmlPtr, out flags, out access));
            try
            {
                return(Marshal.PtrToStringUni(profileXmlPtr));
            }
            finally
            {
                WlanInterop.WlanFreeMemory(profileXmlPtr);
            }
        }