WiFi Framework
ContentsIndexHome
PreviousUpNext
TwclWiFiProfilesManager.GetProfile Method

The method retrieves all information about a specified wireless profile.

Syntax
Pascal
function GetProfile(const IfaceId: TGUID; const ProfileName: string; var Flags: TwclWiFiProfileFlags; out ProfileXml: string): Integer;
Parameters 
Description 
const IfaceId: TGUID 
The ID of the wireless interface.  
const 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.  
var Flags: TwclWiFiProfileFlags 
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.
 
out ProfileXml: string 
A string that is the XML representation of the queried profile. There is no predefined maximum string length.  

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.

TODO CryptUnprotectData

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.  

 

Copyright (c) 2006-2019. All rights reserved.