def WlanEnumInterfaces(hClientHandle):
"""
The WlanEnumInterfaces function enumerates all of the wireless LAN
interfaces currently enabled on the local computer.
DWORD WINAPI WlanEnumInterfaces(
_In_ HANDLE hClientHandle,
_Reserved_ PVOID pReserved,
_Out_ PWLAN_INTERFACE_INFO_LIST *ppInterfaceList
);
"""
func_ref = wlanapi.WlanEnumInterfaces
func_ref.argtypes = [HANDLE,
c_void_p,
POINTER(POINTER(WLAN_INTERFACE_INFO_LIST))]
func_ref.restype = DWORD
wlan_ifaces = pointer(WLAN_INTERFACE_INFO_LIST())
result = func_ref(hClientHandle, None, byref(wlan_ifaces))
if result != ERROR_SUCCESS:
raise Exception("WlanEnumInterfaces failed.")
return wlan_ifaces
评论列表
文章目录