def WlanOpenHandle():
"""
The WlanOpenHandle function opens a connection to the server.
DWORD WINAPI WlanOpenHandle(
_In_ DWORD dwClientVersion,
_Reserved_ PVOID pReserved,
_Out_ PDWORD pdwNegotiatedVersion,
_Out_ PHANDLE phClientHandle
);
"""
func_ref = wlanapi.WlanOpenHandle
func_ref.argtypes = [DWORD, c_void_p, POINTER(DWORD), POINTER(HANDLE)]
func_ref.restype = DWORD
negotiated_version = DWORD()
client_handle = HANDLE()
result = func_ref(2, None, byref(negotiated_version), byref(client_handle))
if result != ERROR_SUCCESS:
raise Exception("WlanOpenHandle failed.")
return client_handle
评论列表
文章目录