Commit 6bb8ca1e authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

wlanapi: Semi-stub WlanEnumInterfaces.

parent 02c6e453
......@@ -63,8 +63,28 @@ static HANDLE handle_new(struct wine_wlan **entry)
DWORD WINAPI WlanEnumInterfaces(HANDLE handle, void *reserved, WLAN_INTERFACE_INFO_LIST **interface_list)
{
FIXME("(%p, %p, %p) stub\n", handle, reserved, interface_list);
return ERROR_CALL_NOT_IMPLEMENTED;
struct wine_wlan *wlan;
WLAN_INTERFACE_INFO_LIST *ret_list;
FIXME("(%p, %p, %p) semi-stub\n", handle, reserved, interface_list);
if (!handle || reserved || !interface_list)
return ERROR_INVALID_PARAMETER;
wlan = handle_index(handle);
if (!wlan)
return ERROR_INVALID_HANDLE;
ret_list = WlanAllocateMemory(sizeof(WLAN_INTERFACE_INFO_LIST));
if (!ret_list)
return ERROR_NOT_ENOUGH_MEMORY;
memset(&ret_list->InterfaceInfo[0], 0, sizeof(WLAN_INTERFACE_INFO));
ret_list->dwNumberOfItems = 0;
ret_list->dwIndex = 0; /* unused in this function */
*interface_list = ret_list;
return ERROR_SUCCESS;
}
DWORD WINAPI WlanCloseHandle(HANDLE handle, void *reserved)
......
......@@ -134,24 +134,19 @@ static void test_WlanEnumInterfaces(void)
/* invalid parameters */
ret = WlanEnumInterfaces(NULL, NULL, &list);
todo_wine
ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %d\n", ret);
ok(list == bad_list, "list changed\n");
ret = WlanEnumInterfaces(handle, &reserved, &list);
todo_wine
ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %d\n", ret);
ok(list == bad_list, "list changed\n");
ret = WlanEnumInterfaces(handle, NULL, NULL);
todo_wine
ok(ret == ERROR_INVALID_PARAMETER, "Expected 87, got %d\n", ret);
ok(list == bad_list, "list changed\n");
/* good tests */
list = NULL;
ret = WlanEnumInterfaces(handle, NULL, &list);
todo_wine
ok(ret == ERROR_SUCCESS, "Expected 0, got %d\n", ret);
todo_wine
ok(list != NULL, "bad interface list\n");
if (!list || !list->dwNumberOfItems)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment