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
bc4db065
Commit
bc4db065
authored
Jun 29, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Jun 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nsi: Implement NsiEnumerateObjectsAllParameterEx().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a907a141
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
2 deletions
+53
-2
nsi.c
dlls/nsi/nsi.c
+53
-2
No files found.
dlls/nsi/nsi.c
View file @
bc4db065
...
...
@@ -25,10 +25,16 @@
#include "iptypes.h"
#include "netiodef.h"
#include "wine/nsi.h"
#include "wine/heap.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
nsi
);
static
inline
HANDLE
get_nsi_device
(
void
)
{
return
CreateFileW
(
L"
\\\\
.
\\
Nsi"
,
0
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
}
DWORD
WINAPI
NsiAllocateAndGetTable
(
DWORD
unk
,
const
NPI_MODULEID
*
module
,
DWORD
table
,
void
**
key_data
,
DWORD
key_size
,
void
**
rw_data
,
DWORD
rw_size
,
void
**
dynamic_data
,
DWORD
dynamic_size
,
void
**
static_data
,
DWORD
static_size
,
DWORD
*
count
,
DWORD
unk2
)
...
...
@@ -46,7 +52,7 @@ DWORD WINAPI NsiEnumerateObjectsAllParameters( DWORD unk, DWORD unk2, const NPI_
struct
nsi_enumerate_all_ex
params
;
DWORD
err
;
FIXME
(
"%d %d %p %d %p %d %p %d %p %d %p %d %p: stub
\n
"
,
unk
,
unk2
,
module
,
table
,
key_data
,
key_size
,
TRACE
(
"%d %d %p %d %p %d %p %d %p %d %p %d %p
\n
"
,
unk
,
unk2
,
module
,
table
,
key_data
,
key_size
,
rw_data
,
rw_size
,
dynamic_data
,
dynamic_size
,
static_data
,
static_size
,
count
);
params
.
unknown
[
0
]
=
0
;
...
...
@@ -72,7 +78,52 @@ DWORD WINAPI NsiEnumerateObjectsAllParameters( DWORD unk, DWORD unk2, const NPI_
DWORD
WINAPI
NsiEnumerateObjectsAllParametersEx
(
struct
nsi_enumerate_all_ex
*
params
)
{
return
ERROR_CALL_NOT_IMPLEMENTED
;
DWORD
out_size
,
received
,
err
=
ERROR_SUCCESS
;
HANDLE
device
=
get_nsi_device
();
struct
nsiproxy_enumerate_all
in
;
BYTE
*
out
,
*
ptr
;
if
(
device
==
INVALID_HANDLE_VALUE
)
return
GetLastError
();
out_size
=
sizeof
(
DWORD
)
+
(
params
->
key_size
+
params
->
rw_size
+
params
->
dynamic_size
+
params
->
static_size
)
*
params
->
count
;
out
=
heap_alloc
(
out_size
);
if
(
!
out
)
{
CloseHandle
(
device
);
return
ERROR_OUTOFMEMORY
;
}
in
.
module
=
*
params
->
module
;
in
.
first_arg
=
params
->
first_arg
;
in
.
second_arg
=
params
->
second_arg
;
in
.
table
=
params
->
table
;
in
.
key_size
=
params
->
key_size
;
in
.
rw_size
=
params
->
rw_size
;
in
.
dynamic_size
=
params
->
dynamic_size
;
in
.
static_size
=
params
->
static_size
;
in
.
count
=
params
->
count
;
if
(
!
DeviceIoControl
(
device
,
IOCTL_NSIPROXY_WINE_ENUMERATE_ALL
,
&
in
,
sizeof
(
in
),
out
,
out_size
,
&
received
,
NULL
))
err
=
GetLastError
();
if
(
err
==
ERROR_SUCCESS
||
err
==
ERROR_MORE_DATA
)
{
params
->
count
=
*
(
DWORD
*
)
out
;
ptr
=
out
+
sizeof
(
DWORD
);
if
(
params
->
key_size
)
memcpy
(
params
->
key_data
,
ptr
,
params
->
key_size
*
params
->
count
);
ptr
+=
params
->
key_size
*
in
.
count
;
if
(
params
->
rw_size
)
memcpy
(
params
->
rw_data
,
ptr
,
params
->
rw_size
*
params
->
count
);
ptr
+=
params
->
rw_size
*
in
.
count
;
if
(
params
->
dynamic_size
)
memcpy
(
params
->
dynamic_data
,
ptr
,
params
->
dynamic_size
*
params
->
count
);
ptr
+=
params
->
dynamic_size
*
in
.
count
;
if
(
params
->
static_size
)
memcpy
(
params
->
static_data
,
ptr
,
params
->
static_size
*
params
->
count
);
}
heap_free
(
out
);
CloseHandle
(
device
);
return
err
;
}
void
WINAPI
NsiFreeTable
(
void
*
key_data
,
void
*
rw_data
,
void
*
dynamic_data
,
void
*
static_data
)
...
...
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