Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51469 Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/wlanapi/main.c | 11 +++++++++++ dlls/wlanapi/wlanapi.spec | 1 + include/wlanapi.h | 8 ++++++++ 3 files changed, 20 insertions(+)
diff --git a/dlls/wlanapi/main.c b/dlls/wlanapi/main.c index d54cc1463ba..bbe560bcd8d 100644 --- a/dlls/wlanapi/main.c +++ b/dlls/wlanapi/main.c @@ -172,6 +172,17 @@ DWORD WINAPI WlanQueryInterface(HANDLE handle, const GUID *guid, WLAN_INTF_OPCOD
return ERROR_CALL_NOT_IMPLEMENTED; } + +DWORD WINAPI WlanHostedNetworkQueryProperty(HANDLE handle, WLAN_HOSTED_NETWORK_OPCODE opcode, + DWORD *data_size, void **data, + WLAN_OPCODE_VALUE_TYPE *opcode_type, void *reserved) +{ + FIXME("(%p, 0x%x, %p, %p, %p, %p) stub\n", + handle, opcode, data_size, data, opcode_type, reserved); + + return ERROR_CALL_NOT_IMPLEMENTED; +} + void WINAPI WlanFreeMemory(void *ptr) { TRACE("(%p)\n", ptr); diff --git a/dlls/wlanapi/wlanapi.spec b/dlls/wlanapi/wlanapi.spec index 1c21ab5a2ea..8931112fcf8 100644 --- a/dlls/wlanapi/wlanapi.spec +++ b/dlls/wlanapi/wlanapi.spec @@ -14,6 +14,7 @@ @ stub WlanGetProfileCustomUserData @ stub WlanGetProfileList @ stub WlanGetSecuritySettings +@ stdcall WlanHostedNetworkQueryProperty(ptr long ptr ptr ptr ptr) @ stub WlanIhvControl @ stdcall WlanOpenHandle(long ptr ptr ptr) @ stub WlanQueryAutoConfigParameter diff --git a/include/wlanapi.h b/include/wlanapi.h index a3288d7778b..10f7cae0f61 100644 --- a/include/wlanapi.h +++ b/include/wlanapi.h @@ -187,6 +187,14 @@ typedef struct _WLAN_AVAILABLE_NETWORK_LIST WLAN_AVAILABLE_NETWORK Network[1]; } WLAN_AVAILABLE_NETWORK_LIST, *PWLAN_AVAILABLE_NETWORK_LIST;
+typedef enum _WLAN_HOSTED_NETWORK_OPCODE +{ + wlan_hosted_network_opcode_connection_settings, + wlan_hosted_network_opcode_security_settings, + wlan_hosted_network_opcode_station_profile, + wlan_hosted_network_opcode_enable +} WLAN_HOSTED_NETWORK_OPCODE, *PWLAN_HOSTED_NETWORK_OPCODE; + DWORD WINAPI WlanCloseHandle(HANDLE, void *); DWORD WINAPI WlanEnumInterfaces(HANDLE, void *, WLAN_INTERFACE_INFO_LIST **); DWORD WINAPI WlanOpenHandle(DWORD, void *, DWORD *, HANDLE *);
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- Also for iBall Soft AP Manager. --- dlls/wlanapi/main.c | 10 ++++++++++ dlls/wlanapi/wlanapi.spec | 1 + include/wlanapi.h | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+)
diff --git a/dlls/wlanapi/main.c b/dlls/wlanapi/main.c index bbe560bcd8d..a865d39f40d 100644 --- a/dlls/wlanapi/main.c +++ b/dlls/wlanapi/main.c @@ -183,6 +183,16 @@ DWORD WINAPI WlanHostedNetworkQueryProperty(HANDLE handle, WLAN_HOSTED_NETWORK_O return ERROR_CALL_NOT_IMPLEMENTED; }
+DWORD WINAPI WlanHostedNetworkQuerySecondaryKey(HANDLE handle, DWORD *key_size, unsigned char *key, + BOOL *passphrase, BOOL *persistent, + WLAN_HOSTED_NETWORK_REASON *error, void *reserved) +{ + FIXME("(%p, %p, %p, %p, %p, %p, %p) stub\n", + handle, key_size, key, passphrase, persistent, error, reserved); + + return ERROR_CALL_NOT_IMPLEMENTED; +} + void WINAPI WlanFreeMemory(void *ptr) { TRACE("(%p)\n", ptr); diff --git a/dlls/wlanapi/wlanapi.spec b/dlls/wlanapi/wlanapi.spec index 8931112fcf8..c0ea019ba58 100644 --- a/dlls/wlanapi/wlanapi.spec +++ b/dlls/wlanapi/wlanapi.spec @@ -15,6 +15,7 @@ @ stub WlanGetProfileList @ stub WlanGetSecuritySettings @ stdcall WlanHostedNetworkQueryProperty(ptr long ptr ptr ptr ptr) +@ stdcall WlanHostedNetworkQuerySecondaryKey(ptr ptr ptr ptr ptr ptr ptr) @ stub WlanIhvControl @ stdcall WlanOpenHandle(long ptr ptr ptr) @ stub WlanQueryAutoConfigParameter diff --git a/include/wlanapi.h b/include/wlanapi.h index 10f7cae0f61..80de128a60f 100644 --- a/include/wlanapi.h +++ b/include/wlanapi.h @@ -195,6 +195,39 @@ typedef enum _WLAN_HOSTED_NETWORK_OPCODE wlan_hosted_network_opcode_enable } WLAN_HOSTED_NETWORK_OPCODE, *PWLAN_HOSTED_NETWORK_OPCODE;
+typedef enum _WLAN_HOSTED_NETWORK_REASON +{ + wlan_hosted_network_reason_success = 0, + wlan_hosted_network_reason_unspecified, + wlan_hosted_network_reason_bad_parameters, + wlan_hosted_network_reason_service_shutting_down, + wlan_hosted_network_reason_insufficient_resources, + wlan_hosted_network_reason_elevation_required, + wlan_hosted_network_reason_read_only, + wlan_hosted_network_reason_persistence_failed, + wlan_hosted_network_reason_crypt_error, + wlan_hosted_network_reason_impersonation, + wlan_hosted_network_reason_stop_before_start, + wlan_hosted_network_reason_interface_available, + wlan_hosted_network_reason_interface_unavailable, + wlan_hosted_network_reason_miniport_stopped, + wlan_hosted_network_reason_miniport_started, + wlan_hosted_network_reason_incompatible_connection_started, + wlan_hosted_network_reason_incompatible_connection_stopped, + wlan_hosted_network_reason_user_action, + wlan_hosted_network_reason_client_abort, + wlan_hosted_network_reason_ap_start_failed, + wlan_hosted_network_reason_peer_arrived, + wlan_hosted_network_reason_peer_departed, + wlan_hosted_network_reason_peer_timeout, + wlan_hosted_network_reason_gp_denied, + wlan_hosted_network_reason_service_unavailable, + wlan_hosted_network_reason_device_change, + wlan_hosted_network_reason_properties_change, + wlan_hosted_network_reason_virtual_station_blocking_use, + wlan_hosted_network_reason_service_available_on_virtual_station +} WLAN_HOSTED_NETWORK_REASON, *PWLAN_HOSTED_NETWORK_REASON; + DWORD WINAPI WlanCloseHandle(HANDLE, void *); DWORD WINAPI WlanEnumInterfaces(HANDLE, void *, WLAN_INTERFACE_INFO_LIST **); DWORD WINAPI WlanOpenHandle(DWORD, void *, DWORD *, HANDLE *);
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- include/windot11.h | 38 ++++++++++++++++++++++++++++++++++++++ include/wlanapi.h | 18 ++---------------- 2 files changed, 40 insertions(+), 16 deletions(-) create mode 100644 include/windot11.h
diff --git a/include/windot11.h b/include/windot11.h new file mode 100644 index 00000000000..e14ed738213 --- /dev/null +++ b/include/windot11.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2021 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _WINDOT11_H +#define _WINDOT11_H + +typedef enum _DOT11_PHY_TYPE +{ + dot11_phy_type_unknown = 0x00, + dot11_phy_type_any = 0x00, + dot11_phy_type_fhss = 0x01, + dot11_phy_type_dsss = 0x02, + dot11_phy_type_irbaseband = 0x03, + dot11_phy_type_ofdm = 0x04, + dot11_phy_type_hrdsss = 0x05, + dot11_phy_type_erp = 0x06, + dot11_phy_type_ht = 0x07, + dot11_phy_type_vht = 0x08, + dot11_phy_type_IHV_start = 0x80000000, + dot11_phy_type_IHV_end = 0xFFFFFFFF +} DOT11_PHY_TYPE, *PDOT11_PHY_TYPE; + +#endif /* _WINDOT11_H */ diff --git a/include/wlanapi.h b/include/wlanapi.h index 80de128a60f..02b787e09a1 100644 --- a/include/wlanapi.h +++ b/include/wlanapi.h @@ -19,6 +19,8 @@ #ifndef _WLAN_WLANAPI_H #define _WLAN_WLANAPI_H
+#include <windot11.h> + typedef enum _WLAN_INTERFACE_STATE { wlan_interface_state_not_ready, @@ -105,22 +107,6 @@ typedef enum _DOT11_CIPHER_ALGORITHM DOT11_CIPHER_ALGO_IHV_END = 0xFFFFFFFF } DOT11_CIPHER_ALGORITHM, *PDOT11_CIPHER_ALGORITHM;
-typedef enum _DOT11_PHY_TYPE -{ - dot11_phy_type_unknown = 0x00, - dot11_phy_type_any = 0x00, - dot11_phy_type_fhss = 0x01, - dot11_phy_type_dsss = 0x02, - dot11_phy_type_irbaseband = 0x03, - dot11_phy_type_ofdm = 0x04, - dot11_phy_type_hrdsss = 0x05, - dot11_phy_type_erp = 0x06, - dot11_phy_type_ht = 0x07, - dot11_phy_type_vht = 0x08, - dot11_phy_type_IHV_start = 0x80000000, - dot11_phy_type_IHV_end = 0xFFFFFFFF -} DOT11_PHY_TYPE, *PDOT11_PHY_TYPE; - #define WLAN_MAX_PHY_TYPE_NUMBER 8
typedef struct _WLAN_AVAILABLE_NETWORK
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- Also for iBall Soft AP Manager. --- dlls/wlanapi/main.c | 7 +++++++ dlls/wlanapi/wlanapi.spec | 1 + include/windot11.h | 3 +++ include/wlanapi.h | 30 ++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+)
diff --git a/dlls/wlanapi/main.c b/dlls/wlanapi/main.c index a865d39f40d..07264c9e136 100644 --- a/dlls/wlanapi/main.c +++ b/dlls/wlanapi/main.c @@ -193,6 +193,13 @@ DWORD WINAPI WlanHostedNetworkQuerySecondaryKey(HANDLE handle, DWORD *key_size, return ERROR_CALL_NOT_IMPLEMENTED; }
+DWORD WINAPI WlanHostedNetworkQueryStatus(HANDLE handle, WLAN_HOSTED_NETWORK_STATUS *status, void *reserved) +{ + FIXME("(%p, %p, %p) stub\n", handle, status, reserved); + + return ERROR_CALL_NOT_IMPLEMENTED; +} + void WINAPI WlanFreeMemory(void *ptr) { TRACE("(%p)\n", ptr); diff --git a/dlls/wlanapi/wlanapi.spec b/dlls/wlanapi/wlanapi.spec index c0ea019ba58..45d83c80b0f 100644 --- a/dlls/wlanapi/wlanapi.spec +++ b/dlls/wlanapi/wlanapi.spec @@ -16,6 +16,7 @@ @ stub WlanGetSecuritySettings @ stdcall WlanHostedNetworkQueryProperty(ptr long ptr ptr ptr ptr) @ stdcall WlanHostedNetworkQuerySecondaryKey(ptr ptr ptr ptr ptr ptr ptr) +@ stdcall WlanHostedNetworkQueryStatus(ptr ptr ptr) @ stub WlanIhvControl @ stdcall WlanOpenHandle(long ptr ptr ptr) @ stub WlanQueryAutoConfigParameter diff --git a/include/windot11.h b/include/windot11.h index e14ed738213..39effeb93ec 100644 --- a/include/windot11.h +++ b/include/windot11.h @@ -35,4 +35,7 @@ typedef enum _DOT11_PHY_TYPE dot11_phy_type_IHV_end = 0xFFFFFFFF } DOT11_PHY_TYPE, *PDOT11_PHY_TYPE;
+typedef UCHAR DOT11_MAC_ADDRESS[6]; +typedef DOT11_MAC_ADDRESS *PDOT11_MAC_ADDRESS; + #endif /* _WINDOT11_H */ diff --git a/include/wlanapi.h b/include/wlanapi.h index 02b787e09a1..13118cbf303 100644 --- a/include/wlanapi.h +++ b/include/wlanapi.h @@ -214,6 +214,36 @@ typedef enum _WLAN_HOSTED_NETWORK_REASON wlan_hosted_network_reason_service_available_on_virtual_station } WLAN_HOSTED_NETWORK_REASON, *PWLAN_HOSTED_NETWORK_REASON;
+typedef enum _WLAN_HOSTED_NETWORK_STATE +{ + wlan_hosted_network_unavailable, + wlan_hosted_network_idle, + wlan_hosted_network_active +} WLAN_HOSTED_NETWORK_STATE, *PWLAN_HOSTED_NETWORK_STATE; + +typedef enum _WLAN_HOSTED_NETWORK_PEER_AUTH_STATE +{ + wlan_hosted_network_peer_state_invalid, + wlan_hosted_network_peer_state_authenticated +} WLAN_HOSTED_NETWORK_PEER_AUTH_STATE, *PWLAN_HOSTED_NETWORK_PEER_AUTH_STATE; + +typedef struct _WLAN_HOSTED_NETWORK_PEER_STATE +{ + DOT11_MAC_ADDRESS PeerMacAddress; + WLAN_HOSTED_NETWORK_PEER_AUTH_STATE PeerAuthState; +} WLAN_HOSTED_NETWORK_PEER_STATE, *PWLAN_HOSTED_NETWORK_PEER_STATE; + +typedef struct _WLAN_HOSTED_NETWORK_STATUS +{ + WLAN_HOSTED_NETWORK_STATE HostedNetworkState; + GUID IPDeviceID; + DOT11_MAC_ADDRESS wlanHostedNetworkBSSID; + DOT11_PHY_TYPE dot11PhyType; + ULONG ulChannelFrequency; + DWORD dwNumberOfPeers; + WLAN_HOSTED_NETWORK_PEER_STATE PeerList[1]; +} WLAN_HOSTED_NETWORK_STATUS, *PWLAN_HOSTED_NETWORK_STATUS; + DWORD WINAPI WlanCloseHandle(HANDLE, void *); DWORD WINAPI WlanEnumInterfaces(HANDLE, void *, WLAN_INTERFACE_INFO_LIST **); DWORD WINAPI WlanOpenHandle(DWORD, void *, DWORD *, HANDLE *);