WlanGetSecuritySettings function (wlanapi.h)
The WlanGetSecuritySettings function gets the security settings associated with a configurable object.
Syntax
DWORD WlanGetSecuritySettings(
[in] HANDLE hClientHandle,
[in] WLAN_SECURABLE_OBJECT SecurableObject,
[out, optional] PWLAN_OPCODE_VALUE_TYPE pValueType,
[out] LPWSTR *pstrCurrentSDDL,
[out] PDWORD pdwGrantedAccess
);
Parameters
[in] hClientHandle
The client's session handle, obtained by a previous call to the WlanOpenHandle function.
[in] SecurableObject
A WLAN_SECURABLE_OBJECT value that specifies the object to which the security settings apply.
[out, optional] pValueType
A pointer to a WLAN_OPCODE_VALUE_TYPE value that specifies the source of the security settings.
Value | Meaning |
---|---|
|
The security settings were set by group policy. |
|
The security settings were set by the user. A user can set security settings by calling WlanSetSecuritySettings. |
[out] pstrCurrentSDDL
On input, this parameter must be NULL.
On output, this parameter receives a pointer to the security descriptor string that specifies the security settings for the object if the function call succeeds. For more information about this string, see WlanSetSecuritySettings function.
[out] pdwGrantedAccess
The access mask of the object.
Value | Meaning |
---|---|
|
The caller can view the object's permissions. |
|
The caller can read from and execute the object. WLAN_EXECUTE_ACCESS has the same value as the bitwise OR combination WLAN_READ_ACCESS | WLAN_EXECUTE_ACCESS. |
|
The caller can read from, execute, and write to the object. WLAN_WRITE_ACCESS has the same value as the bitwise OR combination WLAN_READ_ACCESS | WLAN_EXECUTE_ACCESS | WLAN_WRITE_ACCESS. |
Return value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value may be one of the following return codes.
Return code | Description |
---|---|
|
A parameter is incorrect. This error is returned if any of the following conditions occur:
|
|
A handle is invalid. This error is returned if the handle specified in the hClientHandle parameter was not found in the handle table. |
|
The caller does not have sufficient permissions. |
|
This function was called from an unsupported platform. This value will be returned if this function was called from a Windows XP with SP3 or Wireless LAN API for Windows XP with SP2 client. |
Remarks
The caller is responsible for freeing the memory allocated to the security descriptor string pointed to by the pstrCurrentSDDL parameter if the function succeeds. When no longer needed, the memory for the security descriptor string should be freed by calling WlanFreeMemory function and passing in the pstrCurrentSDDL parameter.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | wlanapi.h (include Wlanapi.h) |
Library | Wlanapi.lib |
DLL | Wlanapi.dll |