The WlanGetSecuritySettings function gets the security settings associated with a configurable object.
DWORD WlanGetSecuritySettings( HANDLE hClientHandle, WLAN_SECURABLE_OBJECT SecurableObject, PWLAN_OPCODE_VALUE_TYPE pValueType, LPWSTR *pstrCurrentSDDL, PDWORD pdwGrantedAccess );
The client's session handle, obtained by a previous call to the WlanOpenHandle function.
A WLAN_SECURABLE_OBJECT value that specifies the object to which the security settings apply.
A pointer to a WLAN_OPCODE_VALUE_TYPE value that specifies the source of the security settings.
||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.|
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.
The access mask of the object.
||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.|
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.
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.|
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.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|
|Header||wlanapi.h (include Wlanapi.h)|