wlanregisternotification函数的shell 最后一个参数数有什么用

WlanGetFilterList function (Windows)
WlanGetFilterList
Expand the table of content
WlanGetFilterList function
The WlanGetFilterList function retrieves a group policy or user permission list.
DWORD WINAPI WlanGetFilterList(
hClientHandle,
WLAN_FILTER_LIST_TYPE wlanFilterListType,
_Reserved_ PVOID
pReserved,
PDOT11_NETWORK_LIST
*ppNetworkList
Parameters
hClientHandle [in]
The client's session handle, obtained by a previous call to the
wlanFilterListType [in]
value that specifies the type of filter list.
All user defined and group policy filter lists can be queried.
Reserved for future use.
Must be set to NULL.
ppNetworkList [out]
Pointer to a
structure that contains the list of permitted or denied networks.
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_ACCESS_DENIED
The caller does not have sufficient permissions to get the filter list.
When called with wlanFilterListType set to wlan_filter_list_type_user_permit,
retrieves the discretionary access control list (DACL) stored with the
wlan_secure_permit_list object. When called with wlanFilterListType set to wlan_filter_list_type_user_deny, WlanGetFilterList retrieves the DACL stored with the
wlan_secure_deny_list object. In either of these cases, if the DACL does not contain an access control entry (ACE) that grants WLAN_READ_ACCESS permission to the access token of the calling thread, then WlanGetFilterList
returns ERROR_ACCESS_DENIED.
ERROR_INVALID_PARAMETER
hClientHandle is NULL or invalid, ppNetworkList is NULL, or pReserved is not NULL.
ERROR_INVALID_HANDLE
The handle hClientHandle
was not found in the handle table.
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.
RPC_STATUS
Various error codes.
User permission lists can be set by calling .
Requirements
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Wlanapi.h (include Wlanapi.h)
Wlanapi.lib
Wlanapi.dll
IN THIS ARTICLE
Is this page helpful?
Additional feedback?
1500 characters remaining
Thank you!
We appreciate your feedback.
(C) Microsoft 2017| 您所在的位置: >
> 关于无线承载网络译文(Wireless Hosted Network)关于无线承载网络译文(Wireless Hosted Network)更新:&&&&编辑:不详&&&&来源:谷普&&&&人气:加载中...&&&&字号:|标签:&&&&&&&&&&&&
(Wireless Hosted Network)是Windows 7和安装有 WLAN 服务的Windows Server 2008 R2中一项新增的WLAN特性。该特性实现了以下两个主要功能:除 STA 网卡一种情况以外,其他所有组合都只能在启用无线承载网络之后才能生效。在无线承载网络禁用的情况下,STA网卡就是物理网卡。只要它已启用,在系统还未调用无线承载网络之前,它就是STA网卡。在系统中,不允许在AP网卡和其他网卡之间建立二层桥接,这一限制对系统中的VSTA网卡同样适用。Windows 中的无线承载网络特性实现了“软AP”,但它并不是用来替代基于硬件的无线AP设备的。特别是在运行无线承载网络时,如果计算机进入睡眠(待机)、睡眠状态,或进行了重启,无线承载网络将会停止,并且在唤醒或重启完成之后,并不会自动开启。另外,软AP不能提供DNS解析。如果不通过Internet连接(见下文)提供外部DNS服务器,在任何两台连接到该软AP的计算机或设备(包括承载该AP的计算机)之间的“完全限定的域名 (FQDN)”解析操作将只在它们双方都将软AP网络类型标记为“专用”(家庭或工作) 时才会正常工作。当承载软AP的计算机将该软AP网络标记为“专用”时,只需让连接到该软AP网络的计算机或设备将该软AP网络标记为“专用”, FQDN解析就可以进行了。软AP和ad hoc网络在同一块物理网卡上是互斥的。当AP网卡上运行着软AP网络时,若有用户或应用程序在STA网卡上启动ad hoc网络,则软AP网络就会停止。当STA网卡上运行着ad hoc 网络时试图在AP网卡上启动软AP网络,则该操作会失败。为了对承载软AP的计算机和与其连接的设备间的通讯提供安全保护,无线承载网络要求所有设备必须使用WPA2-PSK/AES加密机制。无线承载网络首次被调用(即首次调用WlanHostedNetworkStartUsing、 WlanHostedNetworkForceStart或 WlanHostedNetworkInitSettings函数)时会生成一个 63字符的密钥。 用户和应用程序无法更改该共享密钥的值,但是应用程序可以调用WlanHostedNetworkRefreshSecuritySettings函数,请求操作系统生成一个新密钥,用户则可以使用netsh wlan 生成新密钥。该共享密钥被称作无线承载网络的“主密钥”或“系统密钥”,在无线承载网络从启动直到停止阶段的整个过程中保持不变。这个主密钥在netsh wlan 命令中叫做“系统安全密钥”。为了便于使用,无线承载网络还支持“第二密钥”,也称作“用户安全密钥”,使用起来更加友好,但是安全性稍差。在netsh wlan命令中将其称作“用户安全密钥”。它并非由Windows 生成,而是由用户指定。应用程序可以调用WlanHostedNetworkSetSecondaryKey函数,用户则可以使用netsh wlan 命令来设置或更改其值。该密钥可以是永久性的,也可以是临时性的。在无线承载网络正在运行的情况下,临时密钥(第二密钥)将在无线承载网络停止之后失效;在无线承载网络未运行的情况下,它将在无线承载网络从下次启动到停止这段时间内有效。在任何计算机中,无线承载网络都有且只有一个主密钥,一个第二密钥。所有使用 WiFi Protected Setup (WPS) 技术的设备都将接收到主密钥。其他手动配置的设备可以选择使用其中任意一个密钥。一旦某个密钥发生变更,使用该旧密钥的所有设备都必须在重新提供新密钥之后才能再连接到无线承载网络。不过,使用其他未变更密钥来连接的设备仍然可以连接到无线承载网络。应用程序可以注册取得无线承载网络的通知,这样,当无线承载网络属性发生变化时,将会有WLAN通知发送给该应用程序的回调函数,方法是调用 WlanRegisterNotification,并且带上包含WLAN_NOTIFICATION_SOURCE_HNWK 数据值的dwNotifSource 参数。Windows 为 IT 管理员提供了两种管理无线承载网络的方法。第一种是通过组策略对已经加入域的计算机禁用无线承载网络,第二种是使用netsh wlan 命令,在本地计算机上启用或禁用无线承载网络。无线承载网络的应用场景对于 Windows 计算机,无线承载网络主要有两个应用场景:• 向其他无线设备提供无线个人区域网(wireless PAN)。• 向其他计算机和设备提供网络连接共享。共2页:  
评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
分类选择您可能在找这些WlanSetProfilePosition (Compact 2013)
WlanSetProfilePosition
Expand the table of content
WlanSetProfilePosition (Compact 2013)
This function sets the position of a single, designated profile in the preference list.
DWORD WINAPI WlanSetProfilePosition(
HANDLE hClientHandle,
CONST GUID* pInterfaceGuid,
LPCWSTR strProfileName,
DWORD dwPosition,
__reserved
PVOID pReserved
hClientHandle
[in] Handle to the session on the client. To obtain a handle, call the
pInterfaceGuid
[in] GUID of the interface.
strProfileName
[in] Name of the profile. Profile names are case sensitive and the string must be NULL terminated.
dwPosition
[in] Position in the preference list to which the profile should be shifted. Zero corresponds to the first profile in the list that is returned by the
R set to NULL.
Description
ERROR_SUCCESS
The function succeeds.
ERROR_ACCESS_DENIED
You included
in your OS.
The caller does not have sufficient permissions to change the profile position.
ERROR_INVALID_PARAMETER
hClientHandle is NULL or invalid, pInterfaceGuid is NULL, strProfileName is NULL, or pReserved is not NULL.
ERROR_INVALID_HANDLE
The handle hClientHandle was not found in the handle table.
RPC_STATUS
Can be any remote procedure call (RPC) error code. The RPC call may be unsuccessful due to Wlan RPC server issues, such as when the RPC server is not started. Refer to
for more information.
If you include
in your OS design:
You must handle Wi-Fi connection operations using Connection Manager APIs such as , , or .
Otherwise, if you use this API, it returns ERROR_ACCESS_DENIED.
IN THIS ARTICLE
Is this page helpful?
Additional feedback?
1500 characters remaining
Thank you!
We appreciate your feedback.手游开发(35)
上一篇文章中,我们利用addObserver来订阅消息,用postNotification来发布消息,但是有一
点要注意的是,addObserver和postNotification都可以传递一个CCObject数据,那么如果两
个函数都传递了数据,在接收消息时,我们应该取谁的数据呢?
在上一篇的代码中修改OtherLayer类,代码如下:
我们看到,在init中新建了一个CCString对象,作为addObserver函数中的参数
接着,在testMsg中就可以获取到CCString变量,我们用调试模式运行下,将看到以下日志输出:
再来看看postNotification如何传递数据,修改HelloWorldScene.cpp中的sendMsg函数即可:
调试模式下运行项目,可看见:
嗯,什么都没有。
因为,如果addObserver和postNotification函数都传递了数据,并且不是同一个数据,那将
无法发布消息。换句话说,我们只能使用其中一个函数进行数据的传递,我们把
addObserver函数的最后一个参数设为NULL.
再次用调试模式运行项目,可看到:
这代表postNotification的数据传递成功。
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:45558次
积分:1047
积分:1047
排名:千里之外
原创:61篇
转载:27篇
(1)(11)(6)(14)(27)(14)(15)

我要回帖

更多关于 shell 取最后一个参数 的文章

 

随机推荐