Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

WlanGetSecuritySettings function

The WlanGetSecuritySettings function gets the security settings associated with a configurable object.

Syntax


DWORD WINAPI WlanGetSecuritySettings(
  _In_       HANDLE hClientHandle,
  _In_       WLAN_SECURABLE_OBJECT SecurableObject,
  _Out_opt_  PWLAN_OPCODE_VALUE_TYPE pValueType,
  _Out_      LPWSTR *pstrCurrentSDDL,
  _Out_      PDWORD pdwGrantedAccess
);

Parameters

hClientHandle [in]

The client's session handle, obtained by a previous call to the WlanOpenHandle function.

SecurableObject [in]

A WLAN_SECURABLE_OBJECT value that specifies the object to which the security settings apply.

pValueType [out, optional]

A pointer to a WLAN_OPCODE_VALUE_TYPE value that specifies the source of the security settings.

ValueMeaning
wlan_opcode_value_type_set_by_group_policy

The security settings were set by group policy.

wlan_opcode_value_type_set_by_user

The security settings were set by the user. A user can set security settings by calling WlanSetSecuritySettings.

 

pstrCurrentSDDL [out]

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.

pdwGrantedAccess [out]

The access mask of the object.

ValueMeaning
WLAN_READ_ACCESS

The caller can view the object's permissions.

WLAN_EXECUTE_ACCESS

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.

WLAN_WRITE_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 codeDescription
ERROR_INVALID_PARAMETER

A parameter is incorrect. This error is returned if any of the following conditions occur:

  • hClientHandle is NULL.
  • pstrCurrentSDDL is NULL.
  • pdwGrantedAccess is NULL.
  • SecurableObject is set to a value greater than or equal to WLAN_SECURABLE_OBJECT_COUNT (12).
ERROR_INVALID_HANDLE

A handle is invalid. This error is returned if the handle specified in the hClientHandle parameter was not found in the handle table.

ERROR_ACCESS_DENIED

The caller does not have sufficient permissions.

ERROR_NOT_SUPPORTED

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Wlanapi.h (include Wlanapi.h)

Library

Wlanapi.lib

DLL

Wlanapi.dll

See also

Native Wifi API Permissions
WlanFreeMemory
WlanSetSecuritySettings

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.