Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/nsi/nsi.c | 8 ++++++++ dlls/nsi/nsi.spec | 2 +- dlls/nsi/tests/nsi.c | 23 +++++++++++++++++++++++ include/wine/nsi.h | 7 +++++++ 4 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/dlls/nsi/nsi.c b/dlls/nsi/nsi.c index 3691dd5ad2b..bf52fe248c8 100644 --- a/dlls/nsi/nsi.c +++ b/dlls/nsi/nsi.c @@ -51,3 +51,11 @@ DWORD WINAPI NsiGetAllParameters( DWORD unk, const NPI_MODULEID *module, DWORD t rw_data, rw_size, dynamic_data, dynamic_size, static_data, static_size ); return ERROR_CALL_NOT_IMPLEMENTED; } + +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 ) +{ + 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 ); + return ERROR_CALL_NOT_IMPLEMENTED; +} diff --git a/dlls/nsi/nsi.spec b/dlls/nsi/nsi.spec index 7db46c83e94..46757988146 100644 --- a/dlls/nsi/nsi.spec +++ b/dlls/nsi/nsi.spec @@ -12,7 +12,7 @@ @ stub NsiGetAllParametersEx @ stub NsiGetAllPersistentParametersWithMask @ stub NsiObjectSecurity -@ stub NsiGetParameter +@ stdcall NsiGetParameter(long ptr long ptr long long ptr long long) @ stub NsiGetParameterEx @ stub NsiRegisterChangeNotification @ stub NsiRegisterChangeNotificationEx diff --git a/dlls/nsi/tests/nsi.c b/dlls/nsi/tests/nsi.c index e0c0fcf168b..72c9dcdccbd 100644 --- a/dlls/nsi/tests/nsi.c +++ b/dlls/nsi/tests/nsi.c @@ -75,6 +75,29 @@ todo_wine ok( get_dyn.oper_status == dyn->oper_status, "mismatch\n" ); ok( get_stat.if_index == stat->if_index, "mismatch\n" ); 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) ); + + err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl + i, sizeof(*luid_tbl), + NSI_PARAM_TYPE_RW, &get_rw.alias, sizeof(get_rw.alias), + FIELD_OFFSET(struct nsi_ndis_ifinfo_rw, alias) ); + 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" ); + + err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl + i, sizeof(*luid_tbl), + NSI_PARAM_TYPE_STATIC, &get_stat.if_index, sizeof(get_stat.if_index), + FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_index) ); + ok( !err, "got %d\n", err ); + ok( get_stat.if_index == stat->if_index, "mismatch\n" ); + + err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl + i, sizeof(*luid_tbl), + NSI_PARAM_TYPE_STATIC, &get_stat.if_guid, sizeof(get_stat.if_guid), + 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" ); winetest_pop_context(); }
diff --git a/include/wine/nsi.h b/include/wine/nsi.h index 547ed91ce41..e0370b00d41 100644 --- a/include/wine/nsi.h +++ b/include/wine/nsi.h @@ -93,6 +93,11 @@ struct nsi_ndis_ifinfo_static };
/* Undocumented Nsi api */ + +#define NSI_PARAM_TYPE_RW 0 +#define NSI_PARAM_TYPE_DYNAMIC 1 +#define NSI_PARAM_TYPE_STATIC 2 + 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 ); @@ -100,5 +105,7 @@ void WINAPI NsiFreeTable( void *key_data, void *rw_data, void *dynamic_data, voi DWORD WINAPI NsiGetAllParameters( DWORD unk, const NPI_MODULEID *module, DWORD table, const void *key, DWORD key_size, void *rw_data, DWORD rw_size, void *dynamic_data, DWORD dynamic_size, void *static_data, DWORD static_size ); +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 );
#endif /* __WINE_NSI_H */