示例#1
0
        /// <summary>
        /// Gets the profile's XML specification.
        /// </summary>
        /// <param name="profileName">The name of the profile.</param>
        /// <returns>The XML document.</returns>
        public string GetProfileXml(string profileName)
        {
            IntPtr           profileXmlPtr;
            WlanProfileFlags flags;
            WlanAccess       access;

            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);
            }
        }