예제 #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;

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