Re: wlanapi: add a stub for WlanEnumInterfaces
Hiho Austin, here some feedback on the patch as inline comments: On 05.02.2016 06:19, Austin English wrote:
Should fix https://bugs.winehq.org/show_bug.cgi?id=40034. Unfortunately, the user is having issues building wine, and there's no download to verify myself..
attachment.txt
From 060d3427b61058fe7dc4da447743008d030da331 Mon Sep 17 00:00:00 2001 From: Austin English <austinenglish(a)gmail.com> Date: Sun, 24 Jan 2016 20:18:24 -0600 Subject: [PATCH] wlanapi: add WlanOpenHandleFunction stub
Signed-off-by: Austin English <austinenglish(a)gmail.com> --- dlls/wlanapi/main.c | 8 ++++++++ dlls/wlanapi/wlanapi.spec | 2 +- include/wlanapi.h | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 include/wlanapi.h
diff --git a/dlls/wlanapi/main.c b/dlls/wlanapi/main.c index 0b0d100..cba9864 100644 --- a/dlls/wlanapi/main.c +++ b/dlls/wlanapi/main.c @@ -24,6 +24,8 @@ #include "winbase.h" #include "wine/debug.h"
+# include "wlanapi.h"
Why is there a space between "#" and include?
+ WINE_DEFAULT_DEBUG_CHANNEL(wlanapi);
DWORD WINAPI WlanOpenHandle(DWORD clientVersion, PVOID reserved, @@ -49,3 +51,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return TRUE; }
I would suggest to add your implementation above, below the other Wlan* functions.
+ +DWORD WINAPI WlanEnumInterfaces(HANDLE client, void *reserved, WLAN_INTERFACE_INFO_LIST *interface_list)
MSDN says the second argument is a double-pointer.
+{ + FIXME("%p, %p, %p) stub\n",client, reserved, interface_list); + return ERROR_CALL_NOT_IMPLEMENTED; +} \ No newline at end of file diff --git a/dlls/wlanapi/wlanapi.spec b/dlls/wlanapi/wlanapi.spec index 79f9e43..22264c5 100644 --- a/dlls/wlanapi/wlanapi.spec +++ b/dlls/wlanapi/wlanapi.spec @@ -3,7 +3,7 @@ @ stub WlanConnect @ stub WlanDeleteProfile @ stub WlanDisconnect -@ stub WlanEnumInterfaces +@ stdcall WlanEnumInterfaces(ptr ptr ptr)
HANDLEs should be specified as "long" in spec files.
@ stub WlanExtractPsdIEDataList @ stub WlanFreeMemory @ stub WlanGetAvailableNetworkList diff --git a/include/wlanapi.h b/include/wlanapi.h new file mode 100644 index 0000000..15a52ac --- /dev/null +++ b/include/wlanapi.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2016 Austin English + * + * 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 + */ +
Some header-guard wouldn't hurt.
+typedef enum _WLAN_INTERFACE_STATE { + WLAN_INTERFACE_STATE_UNUSED,
Typically all new files use 4 space indentation. Did you copy it from somewhere? Also, where are all the enum fields listed on MSDN? https://msdn.microsoft.com/en-us/library/windows/desktop/ms706877(v=vs.85).a...
+} WLAN_INTERFACE_STATE; + +typedef struct _WLAN_INTERFACE_INFO { + GUID InterfaceGuid; + WCHAR strInterfaceDescription[256]; + WLAN_INTERFACE_STATE isState; +} WLAN_INTERFACE_INFO, *PWLAN_INTERFACE_INFO; + +typedef struct _WLAN_INTERFACE_INFO_LIST { + DWORD dwNumberOfItems; + DWORD dwIndex; + WLAN_INTERFACE_INFO InterfaceInfo[1]; +} WLAN_INTERFACE_INFO_LIST, *PWLAN_INTERFACE_INFO_LIST; + +DWORD (WINAPI *WlanOpenHandleFunction)(DWORD, VOID *, DWORD *, HANDLE *);
This declares a variable and doesn't belong in a header file.
+DWORD WINAPI WlanEnumInterfaces(HANDLE, VOID *, WLAN_INTERFACE_INFO_LIST *);
Should also be a double-pointer here.
-- 2.7.0.rc3
participants (1)
-
Sebastian Lackner