wcl |
public int GetProfile( Guid IfaceId, string ProfileName, ref wclWiFiProfileFlag Flags, out string ProfileXml )
On input is used to provide additional information about the request. If this parameter is an empty set on input, then no information on profile flags will be returned.
On output is used to receive profile flags.
If the GetProfile function succeeds, the wireless profile is returned in the ProfileXml parameter. This is a string that is the XML representation of the queried profile. For a description of the XML representation of the wireless profile, see WLAN_profile Schema.
The keyMaterial element returned in the profile schema pointed to by the ProfileXml may be requested as plaintext if the GetProfile function is called with the pfGetPlaintextKey flag set in the value of the Flags parameter on input.
For a WEP key, both 5 ASCII characters or 10 hexadecimal characters can be used to set the plaintext key when the profile is created or updated. However, a WEP profile will be saved with 10 hexadecimal characters in the key no matter what the original input was used to create the profile. So in the profile returned by the GetProfile method, the plaintext WEP key is always returned as 10 hexadecimal characters.
By default, the keyMaterial element returned in the profile in the ProfileXml is encrypted. If your process runs in the context of the LocalSystem account on the same computer, then you can unencrypt key material by calling the CryptUnprotectData function.