Click or drag to resize

wclWiFiProfilesManagerGetProfile Method

The method retrieves all information about a specified wireless profile.

Namespace: wclWiFi
Assembly: wclWiFiFramework (in wclWiFiFramework.dll) Version: 7.13.1.0 (7.13.1.0)
Syntax
public int GetProfile(
	Guid IfaceId,
	string ProfileName,
	ref wclWiFiProfileFlag Flags,
	out string ProfileXml
)

Parameters

IfaceId  Guid
The ID of the wireless interface.
ProfileName  String
The name of the profile. Profile names are case-sensitive. The maximum length of the profile name is 255 characters. This means that the maximum length of this string is 255 characters.
Flags  wclWiFiProfileFlag

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.

ProfileXml  String
A string that is the XML representation of the queried profile. There is no predefined maximum string length.

Return Value

Int32
If the function succeeds, the return value is WCL_E_SUCCESS. If the function fails, the return value may be one of the WCL return codes.
Remarks

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.

See Also