Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
062067d8
Commit
062067d8
authored
Jan 30, 2017
by
Bruno Jesus
Committed by
Alexandre Julliard
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wlanapi: Implement WlanCloseHandle.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8b3c6943
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
main.c
dlls/wlanapi/main.c
+23
-2
wlanapi.c
dlls/wlanapi/tests/wlanapi.c
+7
-5
No files found.
dlls/wlanapi/main.c
View file @
062067d8
...
...
@@ -35,6 +35,16 @@ static struct wine_wlan
DWORD
magic
,
cli_version
;
}
handle_table
[
16
];
static
struct
wine_wlan
*
handle_index
(
HANDLE
handle
)
{
ULONG_PTR
i
=
(
ULONG_PTR
)
handle
-
1
;
if
(
i
<
sizeof
(
handle_table
)
/
sizeof
(
handle_table
[
0
])
&&
handle_table
[
i
].
magic
==
WLAN_MAGIC
)
return
&
handle_table
[
i
];
return
NULL
;
}
static
HANDLE
handle_new
(
struct
wine_wlan
**
entry
)
{
ULONG_PTR
i
;
...
...
@@ -59,8 +69,19 @@ DWORD WINAPI WlanEnumInterfaces(HANDLE handle, void *reserved, WLAN_INTERFACE_IN
DWORD
WINAPI
WlanCloseHandle
(
HANDLE
handle
,
void
*
reserved
)
{
FIXME
(
"(%p, %p) stub
\n
"
,
handle
,
reserved
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
struct
wine_wlan
*
wlan
;
TRACE
(
"(%p, %p)
\n
"
,
handle
,
reserved
);
if
(
!
handle
||
reserved
)
return
ERROR_INVALID_PARAMETER
;
wlan
=
handle_index
(
handle
);
if
(
!
wlan
)
return
ERROR_INVALID_HANDLE
;
wlan
->
magic
=
0
;
return
ERROR_SUCCESS
;
}
DWORD
WINAPI
WlanOpenHandle
(
DWORD
client_version
,
void
*
reserved
,
DWORD
*
negotiated_version
,
HANDLE
*
handle
)
...
...
dlls/wlanapi/tests/wlanapi.c
View file @
062067d8
...
...
@@ -71,7 +71,6 @@ static void test_WlanOpenHandle(void)
ok
(
neg_version
==
1
,
"Expected 1, got %d
\n
"
,
neg_version
);
ok
(
handle
!=
bad_handle
&&
handle
,
"handle changed
\n
"
);
ret
=
WlanCloseHandle
(
handle
,
NULL
);
todo_wine
ok
(
ret
==
0
,
"Expected 0, got %d
\n
"
,
ret
);
ret
=
WlanOpenHandle
(
2
,
NULL
,
&
neg_version
,
&
handle
);
...
...
@@ -82,7 +81,6 @@ todo_wine
ok
(
neg_version
==
1
,
"Expected 1, got %d
\n
"
,
neg_version
);
ok
(
handle
!=
bad_handle
&&
handle
,
"bad handle
\n
"
);
ret
=
WlanCloseHandle
(
handle
,
NULL
);
todo_wine
ok
(
ret
==
0
,
"Expected 0, got %d
\n
"
,
ret
);
/* open twice */
...
...
@@ -91,15 +89,19 @@ todo_wine
ret
=
WlanOpenHandle
(
1
,
NULL
,
&
neg_version
,
&
handle2
);
ok
(
ret
==
ERROR_SUCCESS
,
"Expected 0, got %d
\n
"
,
ret
);
todo_wine
{
ret
=
WlanCloseHandle
(
handle
,
&
reserved
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected 87, got %d
\n
"
,
ret
);
ret
=
WlanCloseHandle
(
handle
,
NULL
);
ok
(
ret
==
ERROR_SUCCESS
,
"Expected 0, got %d
\n
"
,
ret
);
ret
=
WlanCloseHandle
(
handle2
,
NULL
);
ok
(
ret
==
ERROR_SUCCESS
,
"Expected 0, got %d
\n
"
,
ret
);
ret
=
WlanCloseHandle
(
bad_handle
,
NULL
);
ok
(
ret
==
ERROR_INVALID_HANDLE
,
"Expected 6, got %d
\n
"
,
ret
);
ret
=
WlanCloseHandle
(
NULL
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected 0, got %d
\n
"
,
ret
);
}
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected 87, got %d
\n
"
,
ret
);
}
static
void
test_WlanAllocateFreeMemory
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment