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
f4a0b90f
Commit
f4a0b90f
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: Add a stub implementation of NsiGetParameterEx().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
42fc1dcd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
1 deletion
+74
-1
nsi.c
dlls/nsi/nsi.c
+20
-0
nsi.spec
dlls/nsi/nsi.spec
+1
-1
nsi.c
dlls/nsi/tests/nsi.c
+37
-0
nsi.h
include/wine/nsi.h
+16
-0
No files found.
dlls/nsi/nsi.c
View file @
f4a0b90f
...
...
@@ -115,7 +115,27 @@ DWORD WINAPI NsiGetAllParametersEx( struct nsi_get_all_parameters_ex *params )
DWORD
WINAPI
NsiGetParameter
(
DWORD
unk
,
const
NPI_MODULEID
*
module
,
DWORD
table
,
const
void
*
key
,
DWORD
key_size
,
DWORD
param_type
,
void
*
data
,
DWORD
data_size
,
DWORD
data_offset
)
{
struct
nsi_get_parameter_ex
params
;
FIXME
(
"%d %p %d %p %d %d %p %d %d: stub
\n
"
,
unk
,
module
,
table
,
key
,
key_size
,
param_type
,
data
,
data_size
,
data_offset
);
params
.
unknown
[
0
]
=
0
;
params
.
unknown
[
1
]
=
0
;
params
.
module
=
module
;
params
.
table
=
table
;
params
.
first_arg
=
unk
;
params
.
unknown2
=
0
;
params
.
key
=
key
;
params
.
key_size
=
key_size
;
params
.
param_type
=
param_type
;
params
.
data
=
data
;
params
.
data_size
=
data_size
;
params
.
data_offset
=
data_offset
;
return
NsiGetParameterEx
(
&
params
);
}
DWORD
WINAPI
NsiGetParameterEx
(
struct
nsi_get_parameter_ex
*
params
)
{
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
dlls/nsi/nsi.spec
View file @
f4a0b90f
...
...
@@ -13,7 +13,7 @@
@ stub NsiGetAllPersistentParametersWithMask
@ stub NsiObjectSecurity
@ stdcall NsiGetParameter(long ptr long ptr long long ptr long long)
@ st
ub NsiGetParameterEx
@ st
dcall NsiGetParameterEx(ptr)
@ stub NsiRegisterChangeNotification
@ stub NsiRegisterChangeNotificationEx
@ stub NsiRequestChangeNotification
...
...
dlls/nsi/tests/nsi.c
View file @
f4a0b90f
...
...
@@ -41,6 +41,7 @@ static void test_nsi_api( void )
struct
nsi_ndis_ifinfo_dynamic
*
dyn_tbl
,
*
dyn
,
get_dyn
,
*
enum_dyn_tbl
,
*
enum_dyn
;
struct
nsi_ndis_ifinfo_static
*
stat_tbl
,
*
stat
,
get_stat
,
*
enum_stat_tbl
,
*
enum_stat
;
struct
nsi_get_all_parameters_ex
get_all_params
;
struct
nsi_get_parameter_ex
get_param
;
struct
nsi_enumerate_all_ex
enum_params
;
DWORD
err
,
count
,
i
,
rw_size
,
enum_count
;
NET_LUID
*
luid_tbl
,
*
enum_luid_tbl
;
...
...
@@ -129,6 +130,42 @@ todo_wine
FIELD_OFFSET
(
struct
nsi_ndis_ifinfo_static
,
if_guid
)
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
IsEqualGUID
(
&
get_stat
.
if_guid
,
&
stat
->
if_guid
),
"mismatch
\n
"
);
memset
(
&
get_rw
,
0xcc
,
sizeof
(
get_rw
)
);
memset
(
&
get_dyn
,
0xcc
,
sizeof
(
get_dyn
)
);
memset
(
&
get_stat
,
0xcc
,
sizeof
(
get_stat
)
);
memset
(
&
get_param
,
0
,
sizeof
(
get_param
)
);
get_param
.
first_arg
=
1
;
get_param
.
module
=
&
NPI_MS_NDIS_MODULEID
;
get_param
.
table
=
NSI_NDIS_IFINFO_TABLE
;
get_param
.
key
=
luid_tbl
+
i
;
get_param
.
key_size
=
sizeof
(
*
luid_tbl
);
get_param
.
param_type
=
NSI_PARAM_TYPE_RW
;
get_param
.
data
=
&
get_rw
.
alias
;
get_param
.
data_size
=
sizeof
(
get_rw
.
alias
);
get_param
.
data_offset
=
FIELD_OFFSET
(
struct
nsi_ndis_ifinfo_rw
,
alias
);
err
=
NsiGetParameterEx
(
&
get_param
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
get_rw
.
alias
.
Length
==
rw
->
alias
.
Length
,
"mismatch
\n
"
);
ok
(
!
memcmp
(
get_rw
.
alias
.
String
,
rw
->
alias
.
String
,
rw
->
alias
.
Length
),
"mismatch
\n
"
);
get_param
.
param_type
=
NSI_PARAM_TYPE_STATIC
;
get_param
.
data
=
&
get_stat
.
if_index
;
get_param
.
data_size
=
sizeof
(
get_stat
.
if_index
);
get_param
.
data_offset
=
FIELD_OFFSET
(
struct
nsi_ndis_ifinfo_static
,
if_index
);
err
=
NsiGetParameterEx
(
&
get_param
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
get_stat
.
if_index
==
stat
->
if_index
,
"mismatch
\n
"
);
get_param
.
param_type
=
NSI_PARAM_TYPE_STATIC
;
get_param
.
data
=
&
get_stat
.
if_guid
;
get_param
.
data_size
=
sizeof
(
get_stat
.
if_guid
);
get_param
.
data_offset
=
FIELD_OFFSET
(
struct
nsi_ndis_ifinfo_static
,
if_guid
);
err
=
NsiGetParameterEx
(
&
get_param
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
IsEqualGUID
(
&
get_stat
.
if_guid
,
&
stat
->
if_guid
),
"mismatch
\n
"
);
winetest_pop_context
();
}
...
...
include/wine/nsi.h
View file @
f4a0b90f
...
...
@@ -133,6 +133,21 @@ struct nsi_get_all_parameters_ex
DWORD
static_size
;
};
struct
nsi_get_parameter_ex
{
void
*
unknown
[
2
];
const
NPI_MODULEID
*
module
;
DWORD_PTR
table
;
DWORD
first_arg
;
DWORD
unknown2
;
const
void
*
key
;
DWORD
key_size
;
DWORD_PTR
param_type
;
void
*
data
;
DWORD
data_size
;
DWORD
data_offset
;
};
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
);
...
...
@@ -148,5 +163,6 @@ DWORD WINAPI NsiGetAllParameters( DWORD unk, const NPI_MODULEID *module, DWORD t
DWORD
WINAPI
NsiGetAllParametersEx
(
struct
nsi_get_all_parameters_ex
*
params
);
DWORD
WINAPI
NsiGetParameter
(
DWORD
unk
,
const
NPI_MODULEID
*
module
,
DWORD
table
,
const
void
*
key
,
DWORD
key_size
,
DWORD
param_type
,
void
*
data
,
DWORD
data_size
,
DWORD
data_offset
);
DWORD
WINAPI
NsiGetParameterEx
(
struct
nsi_get_parameter_ex
*
params
);
#endif
/* __WINE_NSI_H */
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