写于博客园,自己迁过来:

一.WlanOpenHandle打开一个客户端句柄

  1. DWORD WINAPI
  2. WlanOpenHandle(
  3. __in DWORD dwClientVersion,
  4. __reserved PVOID pReserved,
  5. __out PDWORD pdwNegotiatedVersion,
  6. __out PHANDLE phClientHandle
  7. );

其取值如下:

1:Windows XP SP2

2:Windows Vista and Windows Server 2008

pReserved:保留值,设为NULL

pdwNegotiatedVersion:Specifies the version of the WLAN API that will be used in this session(out值,返回当前使用的version,比如你在xpsp2下它就返回1)

phClientHandle:Specifies a handle for the client to use in this session. This handle is used by other functions throughout the session(返回的客户端句柄,用于其他wifi函数调用)

MSDN上表示:

WlanOpenHandle will return an error message if the Wireless Zero Configuration (WZC) service has not been started or if the WZC service is not responsive.(必须启动WZC服务,不然WlanOpenHandle 返回失败)

附上启动WZC服务的方法:

1.开始菜单--运行--输入services.msc 2.双击启动Wireless Zero Configuration这个服务,点击“启动”3.改启动类型为自动,确定

二.WlanEnumInterfaces列出无线网卡设备

  1. DWORD WINAPI
  2. WlanEnumInterfaces(
  3. __in HANDLE hClientHandle,
  4. __reserved PVOID pReserved,
  5. __deref_out PWLAN_INTERFACE_INFO_LIST *ppInterfaceList
  6. );

hClientHandle:The client's session handle, obtained by a previous call to the WlanOpenHandle function.(WlanOpenHandle返回的那个客户端句柄)

pReserved:保留值,设为NULL

ppInterfaceList:Pointer to a WLAN_INTERFACE_INFO_LIST structure that contains the list of NIC interfaces.(网卡接口信息列表结构的指针,NIC:Network
Interface Card,也就是网络适配器/网卡),This function will allocate memory for the list of returned interfaces. The caller is responsible for freeing this memory using the WlanFreeMemory function(意思就是你传一个空指针的地址进去就行了,系统自动分配,你记得用完后用WlanFreeMemory释放)

  1. typedef struct _WLAN_INTERFACE_INFO_LIST{
  2. DWORD dwNumberOfItems;
  3. DWORD dwIndex;
  4. WLAN_INTERFACE_INFO InterfaceInfo[];} WLAN_INTERFACE_INFO_LIST, *PWLAN_INTERFACE_INFO_LIST;

dwNumberOfItems:Contains the number of items in the InterfaceInfo member(InterfaceInfo[ ] 中包含的单元的个数)

dwIndex:0到dwNumberOfItems-1, 一般用于在 WLAN_INTERFACE_INFO_LIST 作为参数传递时的一个传递偏移量。这个参数在用之前必须要进行初始化

InterfaceInfo[]:An array of WLAN_INTERFACE_INFO structures containing interface information.(包含WLAN_INTERFACE_INFO
结构体的阵列,用于记录接口信息)

  1. typedef struct _WLAN_INTERFACE_INFO {
  2. GUID InterfaceGuid;
  3. WCHAR strInterfaceDescription[256];
  4. WLAN_INTERFACE_STATE isState;
  5. } WLAN_INTERFACE_INFO, *PWLAN_INTERFACE_INFO;

InterfaceGuid:Contains the GUID of the interface.(接口的GUID,GUID:Globally Unique Identifier(全球唯一标识符),据称是根椐时间,网卡,机器名等结合算法生成的,所以唯一,所以调用者在某些函数中可以通过GUID来指定特定网卡)

strInterfaceDescription[256]:Contains the description of the interface(接口的描绘信息,打开设备管理器-无线网卡属性可以看到描述)

isState:Contains a WLAN_INTERFACE_STATE value that indicates the current state of the interface.(包含一个 WLAN_INTERFACE_STATE值,标示这个NIC接口的当前状态)

  1. typedef enum _WLAN_INTERFACE_STATE {
  2. wlan_interface_state_not_ready = 0,
  3. wlan_interface_state_connected,
  4. wlan_interface_state_ad_hoc_network_formed,
  5. wlan_interface_state_disconnecting,
  6. wlan_interface_state_disconnected,
  7. wlan_interface_state_associating,
  8. wlan_interface_state_discovering,
  9. wlan_interface_state_authenticating
  10. } WLAN_INTERFACE_STATE, *PWLAN_INTERFACE_STATE;

WirelessLAN API for Windows XP SP2:

Only the wlan_interface_state_connected, wlan_interface_state_disconnected, and wlan_interface_state_authenticating values are supported.(xpsp2下仅支持已连接,已断开,生效中这三种状态)

三.WlanGetAvailableNetworkList获得有效的无线网络信息

  1. DWORD WINAPI WlanGetAvailableNetworkList(
  2. __in HANDLE hClientHandle,
  3. __in const GUID* pInterfaceGuid,
  4. __in DWORD dwFlags,
  5. PVOID pReserved,
  6. __out PWLAN_AVAILABLE_NETWORK_LIST* ppAvailableNetworkList
  7. );

hClientHandle:The client's session handle, obtained by a previous call to the WlanOpenHandle function.(WlanOpenHandle返回的那个客户端句柄)

pInterfaceGuid:The GUID of the interface to be queried.(上面 WLAN_INTERFACE_INFO 的GUID,也就是网卡的GUID)

dwFlags:Controls the type of networks returned in the list(控制ppAvailableNetworkList中获得的网络类型),其值为0,1,2,3(1和2组合)四种选择

1:Include all ad-hoc network profiles in the available network list, including profiles that are not visible.(ad-hoc network :即点对点方式的无线网络,包括profiles name(配置文件名称)不可见(获得profiles name字符为空)的所有点对对无线网络)

2:Include all hidden network profiles in the available network list, including profiles that are not visible.(包括profiles name(配置文件名称)不可见(获得profiles name字符为空)的所有隐藏网络配置)

3:前二者的组合

ppAvailableNetworkList:Pointer to a WLAN_AVAILABLE_NETWORK_LIST to receive the returned list of visible
networks.(无线网络列表)This function will allocate memory for the list of returned interfaces. The caller is responsible for freeing this memory using the WlanFreeMemory function(传一个空指针的地址进去就行了,系统自动分配,调用者负责用WlanFreeMemory释放)

这个结构和WLAN_INTERFACE_INFO_LIST 相仿.

  1. typedef struct _WLAN_AVAILABLE_NETWORK_LIST {
  2. DWORD dwNumberOfItems;
  3. DWORD dwIndex;
  4. WLAN_AVAILABLE_NETWORK Network[1];
  5. } WLAN_AVAILABLE_NETWORK_LIST,
  6. *PWLAN_AVAILABLE_NETWORK_LIST;

dwNumberOfItems:Contains the number of items in the Network member(网络数目)

dwIndex:0到dwNumberOfItems-1,一般用于在WLAN_AVAILABLE_NETWORK_LIST 作为参数传递时的一个传递偏移量。这个参数在用之前必须要进行初始化

Network[1]:An array of WLAN_AVAILABLE_NETWORK structures containing interface information.(包含WLAN_AVAILABLE_NETWORK 的阵列,用于记录网络信息)

  1. typedef struct _WLAN_AVAILABLE_NETWORK {
  2. WCHAR strProfileName[256];
  3. DOT11_SSID dot11Ssid;
  4. DOT11_BSS_TYPE dot11BssType;
  5. ULONG uNumberOfBssids;
  6. BOOL bNetworkConnectable;
  7. WLAN_REASON_CODE wlanNotConnectableReason;
  8. ULONG uNumberOfPhyTypes;
  9. DOT11_PHY_TYPE dot11PhyTypes[WLAN_MAX_PHY_TYPE_NUMBER];
  10. BOOL bMorePhyTypes;
  11. WLAN_SIGNAL_QUALITY wlanSignalQuality;
  12. BOOL bSecurityEnabled;
  13. DOT11_AUTH_ALGORITHM dot11DefaultAuthAlgorithm;
  14. DOT11_CIPHER_ALGORITHM dot11DefaultCipherAlgorithm;
  15. DWORD dwFlags;
  16. DWORD dwReserved;
  17. } WLAN_AVAILABLE_NETWORK, *PWLAN_AVAILABLE_NETWORK;

strProfileName:Contains the profile name associated with the network. If the network doesn't have a profile, this member will be empty. If multiple profiles are associated with the network, there will be multiple entries
with the same SSID in the visible network list. Profile names are case-sensitive. This string must be NULL-terminated(配置文件名,没有就为空,大小写敏感)

dot11Ssid:A DOT11_SSID structure that contains the SSID of the visible wireless network(网络的SSID,网络名,
SSID是Service Set Identifier的缩写,意思是:服务集标识。SSID技术可以将一个无线局域网分为几个需要不同身份验证的子网络,每一个子网络都需要独立的身份验证,只有通过身份验证的用户才可以进入相应的子网络,防止未被授权的用户进入本网络.
通俗地说,SSID便是你给自己的无线网络所取的名字)

  1. typedef struct _DOT11_SSID {
  2. ULONG uSSIDLength;
  3. UCHAR ucSSID[DOT11_SSID_MAX_LENGTH];
  4. } DOT11_SSID,
  5. *PDOT11_SSID;

uSSIDLength:实际长度(byte单位)

ucSSID:SSID字符串,注意typedef unsigned char UCHAR;所以在Unicode环境下,要做字符转换再打印显示

dot11BssType:A DOT11_BSS_TYPE value that specifies whether the network is infrastructure or ad hoc.(指明网络是集中控制式还是点对点式)

  1. typedef enum _DOT11_BSS_TYPE{
  2.  
  3. dot11_BSS_type_infrastructure//BSS
  4.  
  5. dot11_BSS_type_infrastructure//IBSS
  6.  
  7. dot11_BSS_type_any//other
  8.  
  9. }DOT11_BSS_TYPE, *PDOT11_BSS_TYPE;

集中控制式(Infrastructure)也称独立无线网络,简称BSS,是在一种整合有线与无线局域网架构的应用模式,与ad- hoc不同的是配备无线网卡的电脑必须通过ap来进行无线通讯,设置后,无线网络设备就必须有AP(Access
Pointer)来沟通,一般有多个有线客户端和无线客户端围绕一个AP或无线路由器组成的服务集,所有客户端通过一个AP或无线路由器进行通信,客户端之间不直接进行通信,与对等(Ad Hoc)无线网络相比有更多的安全性和扩展能力

uNumberOfBssids: Indicates the number of BSSIDs in the network

ssid 是一个无线AP的名称。bssid 是这个无线AP的MAC地址

bNetworkConnectable:Indicates whether the network is connectable or not(是否可连接)

wlanNotConnectableReason :indicates why a network cannot be connected to. This member is only valid when bNetworkConnectable is FALSE(如果网络是不可连接的,这里返回原因)

wlanSignalQuality:A percentage value that represents the signal quality of the network(0-100网络信号)

bSecurityEnabled:Indicates whether security is enabled on the network(有没有安全锁)

dot11DefaultAuthAlgorithm:A DOT11_AUTH_ALGORITHM value that indicates the default authentication algorithm
used to join this network for the first time(首次加入该网络使用的默认认证算法,个人理解是和无线网络的安全认证算法(协议s)有关)

  1. typedef enum _DOT11_AUTH_ALGORITHM {
  2. DOT11_AUTH_ALGO_80211_OPEN = 1,//80211开放系统认证算法
  3. DOT11_AUTH_ALGO_80211_SHARED_KEY = 2,//80211共享密钥认证算法
  4. DOT11_AUTH_ALGO_WPA = 3,//wifi保护访问(WPA)
  5. DOT11_AUTH_ALGO_WPA_PSK = 4,//WPA的简化版――WPA-PSK(预共享密钥)
  6. DOT11_AUTH_ALGO_WPA_NONE = 5, DOT11_AUTH_ALGO_RSNA = 6,
  7. DOT11_AUTH_ALGO_RSNA_PSK = 7,
  8. DOT11_AUTH_ALGO_IHV_START = 0x80000000,
  9. DOT11_AUTH_ALGO_IHV_END = 0xffffffff
  10. } DOT11_AUTH_ALGORITHM, * PDOT11_AUTH_ALGORITHM;

dot11DefaultCipherAlgorithm:A DOT11_CIPHER_ALGORITHM value
that indicates the default cipher algorithm to be used when joining this network(DOT11_CIPHER_ALGORITHM 值表明了加入这个网络要使用的默认加密算法,个人理解是破解了这个加密算法后,咱就可免费蹭网了)

  1. typedef enum _DOT11_CIPHER_ALGORITHM {
  2. DOT11_CIPHER_ALGO_NONE = 0x00,//无加密算法可用或支持
  3. DOT11_CIPHER_ALGO_WEP40 = 0x01,//有线对等协议(WEP)算法
  4. DOT11_CIPHER_ALGO_TKIP = 0x02,// DOT11_CIPHER_ALGO_CCMP = 0x04,//TKIP由WEP使用的同样的加密引擎和RC4算法组成
  5. DOT11_CIPHER_ALGO_WEP104 = 0x05,
  6. DOT11_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  7. DOT11_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  8. DOT11_CIPHER_ALGO_WEP = 0x101,
  9. DOT11_CIPHER_ALGO_IHV_START = 0x80000000,
  10. DOT11_CIPHER_ALGO_IHV_END = 0xffffffff
  11. } DOT11_CIPHER_ALGORITHM, * PDOT11_CIPHER_ALGORITHM;

四.WlanConnect连接某个网络

  1. DWORD WINAPI WlanConnect(
  2. __in HANDLE hClientHandle,
  3. __in const GUID* pInterfaceGuid,
  4. __in const PWLAN_CONNECTION_PARAMETERS pConnectionParameters,
  5. PVOID pReserved
  6. );

hClientHandle:The client's session handle, returned by a previous call to the WlanOpenHandle function

pInterfaceGuid:The GUID of the interface to use for the connection.(网卡的GUID,不是要连接的网络的ssid!)

pConnectionParameters:Pointer to a WLAN_CONNECTION_PARAMETERS structure that specifies the connection
type, mode, network profile, SSID that identfies the network, and other parameters(简言之,指出要连接的网络)

  1. typedef struct _WLAN_CONNECTION_PARAMETERS {
  2. WLAN_CONNECTION_MODE wlanConnectionMode;
  3. LPCWSTR strProfile;
  4. PDOT11_SSID pDot11Ssid;
  5. PDOT11_BSSID_LIST pDesiredBssidList;
  6. DOT11_BSS_TYPE dot11BssType;
  7. DWORD dwFlags;
  8. } WLAN_CONNECTION_PARAMETERS, *PWLAN_CONNECTION_PARAMETERS;

wlanConnectionMode:A WLAN_CONNECTION_MODE value
that specifies the mode of connection.Wireless LAN API for Windows XP SP2:Only the wlan_connection_mode_profile
value is supported(连接模式,xpsp2下只能使用配置文件连接)

  1. typedef enum _WLAN_CONNECTION_MODE {
  2. wlan_connection_mode_profile = 0,//使用配置文件连接
  3. wlan_connection_mode_temporary_profile,//使用临时配置文件连接
  4. wlan_connection_mode_discovery_secure,//使用发现的安全网络连接
  5. wlan_connection_mode_discovery_unsecure,//使用发现的不安全网络连接
  6. wlan_connection_mode_auto,//自动连接
  7. wlan_connection_mode_invalid//...无效的
  8. } WLAN_CONNECTION_MODE, *PWLAN_CONNECTION_MODE;

strProfile:Specifies the profile being used for the connection.If wlanConnectionMode is set to wlan_connection_mode_profile, then strProfile specifies the name of the profile used for
the connection. If wlanConnectionMode is set to wlan_connection_mode_temporary_profile, then strProfile specifies the XML representation of the profile used for the connection. If wlanConnectionMode is set
to wlan_connection_mode_discovery_secure, wlan_connection_mode_discovery_unsecure, or wlan_connection_mode_auto, then strProfile should be set to NULL(配置文件名)

pDot11Ssid:pointer to a DOT11_SSID structure that specifies the SSID of the network to connect to. This
parameter is optional. When set to NULL, all SSIDs in the profile will be tried. This parameter must not be NULL ifWLAN_CONNECTION_MODE is set to wlan_connection_mode_discovery_secure or wlan_connection_mode_discovery_unsecure.(对应WLAN_AVAILABLE_NETWORK 中的DOT11_SSID ,如设为NULL,配置文件的所有SSID都会被尝试,如果为wlan_connection_mode_discovery_secure
、wlan_connection_mode_discovery_unsecure不能设为NULL)

pDesiredBssidList:Pointer to a DOT11_BSSID_LISTstructure that contains the list of basic service set
(BSS) identifiers desired for the connection.Wireless LAN API for Windows XP SP2:  This member must be NULL(xpsp2设为NULL就行了)

dot11BssType:A DOT11_BSS_TYPE value that indicates the BSS type of the network. If a
profile is provided, this BSS type must be the same as the one in the profile.(对应WLAN_AVAILABLE_NETWORK的 DOT11_BSS_TYPE)

结合前四个步骤,扫描NIC,获得可连接网络属性,再连接,我们可以实现网络属性显示和无密码的网络连接

下面介绍有密码的网络连接:

有密码的网络连接必须设置网络配置文件(WlanSetProfile,WlanGetProfile)

将密码写入配置xml中,再调用WlanConnect,因此理解xml的元素是关键.

五.配置xml文件

先给个完整的例子:这是从我笔记本上直接WlanGetProfile得到的,key部分已变成密文,不影响理解就行了

  1. <?xml version="1.0"?>
  2. <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
  3. <name>FAST_1797A2</name>
  4. <SSIDConfig>
  5. <SSID>
  6. <hex>464153545F313739374132</hex>
  7. <name>FAST_1797A2</name>
  8. </SSID>
  9. </SSIDConfig>
  10. <connectionType>ESS</connectionType>
  11. <MSM>
  12. <security>
  13. <authEncryption>
  14. <authentication>WPA2PSK</authentication>
  15. <encryption>AES</encryption>
  16. <useOneX>false</useOneX>
  17. </authEncryption>
  18. <sharedKey>
  19. <keyType>networkKey</keyType>
  20. <protected>false</protected>
  21. <keyMaterial>8C7AC8A03F13838846AA180B7F1B65A61D46FAB64743FFCA0E86F6EEB6DDC8AE</keyMaterial>
  22. </sharedKey>
  23. </security>
  24. </MSM>
  25. </WLANProfile>

一般要生成一个这样的xml,我们只需一个WLAN_AVAILABLE_NETWORK(前面ENUM的可用网络结构体)

Xml 的namespace一般都是 http://www.microsoft.com/networking/WLAN/profile/v1

FIPSMode使用http://www.microsoft.com/networking/WLAN/profile/v2

<name>:wlan的名称,和ssid名字一样就行了(个人测试)

<SSIDConfig>:contains one or more SSIDs(包含SSID的域,但MSDN也有这样的说明:

Windows XP with SP3 and Wireless LAN API for WindowsXP with SP2:At most one SSID element
can appear in a profile.(所以仅能传一个SSID元素进去就行了)

<SSID>:传WLAN_AVAILABLE_NETWORK的ssid名字进去

<connectionType>:WLAN_AVAILABLE_NETWORKDOT11_BSS_TYPE:ESS和IBSS

<connectionMode>:auto/manual, If connectionType is
set to ESS, this value can be either auto or manual. The default value is auto if this element is absent.If connectionType is
set to IBSS, this value must be manual.(如果connectionType为ESS,可设自动或手动,默认为自动,IBSS必须为手动,上面XML为没有设置的ESS,默认为自动)

<autoSwitch>:WindowsXP with SP3 and Wireless LAN API for WindowsXP with SP2:This element is not supported.

<authEncryption>:specifies the authentication and encryption pair to be used for this profile,指定了认证和加密element.

<authentication>:DOT11_AUTH_ALGORITHM之间存在以下对应关系:

  1. tenum _DOT11_AUTH_ALGORITHM {
  2. DOT11_AUTH_ALGO_80211_OPEN = 1, //open
  3. DOT11_AUTH_ALGO_80211_SHARED_KEY = 2, //shared
  4. DOT11_AUTH_ALGO_WPA = 3, //WPA
  5. DOT11_AUTH_ALGO_WPA_PSK = 4, //WPAPSK
  6. DOT11_AUTH_ALGO_WPA_NONE = 5, //WPA
  7. DOT11_AUTH_ALGO_RSNA = 6, //WPA2
  8. DOT11_AUTH_ALGO_RSNA_PSK = 7, //WPA2PSK
  9. DOT11_AUTH_ALGO_IHV_START = 0x80000000, //open
  10. DOT11_AUTH_ALGO_IHV_END = 0xffffffff //open
  11. } DOT11_AUTH_ALGORITHM, * PDOT11_AUTH_ALGORITHM;

<encryption>:DOT11_CIPHER_ALGORITHM之间存在以下对应关系:

  1. typedef enum _DOT11_CIPHER_ALGORITHM {
  2. DOT11_CIPHER_ALGO_NONE = 0x00, //none
  3. DOT11_CIPHER_ALGO_WEP40 = 0x01, //WEP
  4. DOT11_CIPHER_ALGO_TKIP = 0x02, //TKIP
  5. DOT11_CIPHER_ALGO_CCMP = 0x04, //AES
  6. DOT11_CIPHER_ALGO_WEP104 = 0x05, //AES
  7. DOT11_CIPHER_ALGO_WPA_USE_GROUP = 0x100, //AES
  8. DOT11_CIPHER_ALGO_RSN_USE_GROUP = 0x100, //AES
  9. DOT11_CIPHER_ALGO_WEP = 0x101, //WEP
  10. DOT11_CIPHER_ALGO_IHV_START = 0x80000000, //none
  11. DOT11_CIPHER_ALGO_IHV_END = 0xffffffff //none
  12. } DOT11_CIPHER_ALGORITHM, * PDOT11_CIPHER_ALGORITHM;

The AES encryption method is as specified in the 802.1X and 802.11i specifications.

<keyType>:When the encryption element has a value of WEP, keyType must
be set to networkKey.(当encryption是WEP时,必须为networkKey,看了MSDN的profile,其余全部用passPhrase)

<protected>: For profiles intended for use on Windows XP with Service Pack 3 (SP3) or Wireless LAN API for Windows XP with Service Pack 2 (SP2), protectedmust have a value of FALSE. (必须设为FALSE以支持xp)

<keyMaterial>:密码明文放入即可,如果使用了加密算法,再取出来就是密文了

六.WlanSetProfile写入配置文件

  1. DWORD WINAPI WlanSetProfile(
  2. __in HANDLE hClientHandle,//不解释
  3. __in const GUID* pInterfaceGuid, //不解释
  4. __in DWORD dwFlags,//0表示全部用户
  5. __in LPCWSTR strProfileXml,//前面的XML
  6. __in_opt LPCWSTR strAllUserProfileSecurity,//xp下必须为NULL
  7. __in BOOL bOverwrite,//如已存在profile,是否覆盖
  8. __in PVOID pReserved,

七. WlanDisconnect断开连接

  1. DWORD WINAPI
  2. WlanDisconnect(
  3. __in HANDLE hClientHandle, //不解释
  4. __in CONST GUID *pInterfaceGuid, //不解释
  5. __reserved PVOID pReserved
  6. );

附录

xml元素我主要参考:http://msdn.microsoft.com/en-us/library/ms706965(v=vs.85).asp



Native wifi API使用的更多相关文章

  1. Native Wifi API

    原文链接地址:https://www.cnblogs.com/jackcin/p/3285357.html 在windows平台下,可以使用native wifi api来控制无线网卡,包括获取无线网 ...

  2. VC++玩转Native Wifi API 2---Wifi on与wifi off

     有心栽花花不开,无心插柳柳成排. 今天要说的这个wifi on\off是在软件层面控制无线网卡的开和关. 问题听起来简单,调查起来复杂.但解决起来却也简单.关键函数便是Native wifi a ...

  3. C#编程使用Managed Wifi API连接无线SSID

    C#编程使用Managed Wifi API连接无线SSIDhttp://www.2cto.com/kf/201307/227623.html Managed Wifi API - Homehttp: ...

  4. Jboss EAP:native management API学习

    上一节已经学习了CLI命令行来控制JBOSS,如果想在程序中以编码方式来控制JBOSS,可以参考下面的代码,实际上在前面的文章,用代码控制Jboss上的DataSource,已经有所接触了,API与C ...

  5. Java JVM、JNI、Native Function Interface、Create New Process Native Function API Analysis

    目录 . JAVA JVM . Java JNI: Java Native Interface . Java Create New Process Native Function API Analys ...

  6. 如何使用Native Messaging API 打开window程序

    问 如何使用Native Messaging API 打开window程序 cmd javascript terminal chrome Tychio 2013年03月26日提问 关注 1 关注 收藏 ...

  7. node-webkit教程<>Native UI API 之Menu(菜单)

    node-webkit教程(6)Native UI API 之Menu(菜单)1 前言... 2 6.1  Menu 概述... 3 6.2  menu api6 6.2.1  new Menu([o ...

  8. NODE-WEBKIT教程(6)NATIVE UI API 之MENU(菜单)

    node-webkit教程(6)Native UI API 之Menu(菜单) 文/玄魂 目录 node-webkit教程(6)Native UI API 之Menu(菜单) 前言 6.1  Menu ...

  9. NODE-WEBKIT教程(5)NATIVE UI API 之FRAMELESS WINDOW

    node-webkit教程(5)Native UI API 之Frameless window 文/玄魂 原文链接:http://www.xuanhun521.com/Blog/2014/4/15/n ...

随机推荐

  1. log4net 配置

    1.是直接在代码中通过调用XmlConfigurator.Configure()来解析配置文件,配置日志环境. log4net.Config.XmlConfigurator.Configure(); ...

  2. IOC框架整体介绍

    1.Castle Windsor 2.Autofac 3.Unity 4.Spring.NET 5.StructureMap 6.Ninject

  3. CentOS下安装LAMP环境

    1.安装Apache yum -y install httpd # 开机自启动 chkconfig httpd on # 启动httpd 服务 service httpd start #安装apach ...

  4. recyleView使用笔记

    直接上代码: package com.test.recycleview; import android.app.Activity; import android.graphics.Canvas; im ...

  5. log4cplus 在配置文件中设置文件路径,程序自动创建目录,且在日志文件前按日期创建相应的目录

    #include <string> #include <cstdio> #include <log4cplus/logger.h> #include <log ...

  6. 获取JAVA[WEB]项目相关路径的几种方法

    在jsp和class文件中调用的相对路径不同. 在jsp里,根目录是WebRoot 在class文件中,根目录是WebRoot/WEB-INF/classes 当然你也可以用System.getPro ...

  7. VS2013各个版本秘钥

    Visual Studio Ultimate 2013 KEY(密钥):BWG7X-J98B3-W34RT-33B3R-JVYW9 Visual Studio Premium 2013 KEY(密钥) ...

  8. Codeforces 732e [贪心][stl乱搞]

    /* 不要低头,不要放弃,不要气馁,不要慌张 题意: 给n个插座,m个电脑.每个插座都有一个电压,每个电脑都有需求电压. 每个插座可以接若干变压器,每个变压器可以使得电压变为x/2上取整. 有无限个变 ...

  9. python——argsort函数

    numpy中argsort函数用法,有需要的朋友可以参考下. 在Python中使用help帮助 >>> import numpy >>> help(numpy.ar ...

  10. openscales实现漂亮的冒泡效果

    使用的时候openscales 默认的冒泡效果确实有点简陋,想实现那种看着比较舒服的效果,只能自己定义了.参考现有的openscales实现的方式,它是通过控件的状态实现的,每个状态中使用Path绘制 ...