예제 #1
0
 /// <summary>
 /// Sets the profile.
 /// </summary>
 /// <param name="flags">The flags to set on the profile.</param>
 /// <param name="profileXml">The XML representation of the profile. On Windows XP SP 2, special care should be taken to adhere to its limitations.</param>
 /// <param name="overwrite">If a profile by the given name already exists, then specifies whether to overwrite it (if <c>true</c>) or return an error (if <c>false</c>).</param>
 /// <returns>The resulting code indicating a success or the reason why the profile wasn't valid.</returns>
 public Wlan.WlanReasonCode SetProfile(Wlan.WlanProfileFlags flags, string profileXml, bool overwrite)
 {
     Wlan.WlanReasonCode reasonCode;
     Wlan.ThrowIfError(
         Wlan.WlanSetProfile(client.clientHandle, info.interfaceGuid, flags, profileXml, null, overwrite, IntPtr.Zero, out reasonCode));
     return(reasonCode);
 }