Commit f4a0b90f authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

nsi: Add a stub implementation of NsiGetParameterEx().

parent 42fc1dcd
...@@ -115,7 +115,27 @@ DWORD WINAPI NsiGetAllParametersEx( struct nsi_get_all_parameters_ex *params ) ...@@ -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 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 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, 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 ); 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; return ERROR_CALL_NOT_IMPLEMENTED;
} }
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
@ stub NsiGetAllPersistentParametersWithMask @ stub NsiGetAllPersistentParametersWithMask
@ stub NsiObjectSecurity @ stub NsiObjectSecurity
@ stdcall NsiGetParameter(long ptr long ptr long long ptr long long) @ stdcall NsiGetParameter(long ptr long ptr long long ptr long long)
@ stub NsiGetParameterEx @ stdcall NsiGetParameterEx(ptr)
@ stub NsiRegisterChangeNotification @ stub NsiRegisterChangeNotification
@ stub NsiRegisterChangeNotificationEx @ stub NsiRegisterChangeNotificationEx
@ stub NsiRequestChangeNotification @ stub NsiRequestChangeNotification
......
...@@ -41,6 +41,7 @@ static void test_nsi_api( void ) ...@@ -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_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_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_all_parameters_ex get_all_params;
struct nsi_get_parameter_ex get_param;
struct nsi_enumerate_all_ex enum_params; struct nsi_enumerate_all_ex enum_params;
DWORD err, count, i, rw_size, enum_count; DWORD err, count, i, rw_size, enum_count;
NET_LUID *luid_tbl, *enum_luid_tbl; NET_LUID *luid_tbl, *enum_luid_tbl;
...@@ -129,6 +130,42 @@ todo_wine ...@@ -129,6 +130,42 @@ todo_wine
FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_guid) ); FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_guid) );
ok( !err, "got %d\n", err ); ok( !err, "got %d\n", err );
ok( IsEqualGUID( &get_stat.if_guid, &stat->if_guid ), "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) );
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(); winetest_pop_context();
} }
......
...@@ -133,6 +133,21 @@ struct nsi_get_all_parameters_ex ...@@ -133,6 +133,21 @@ struct nsi_get_all_parameters_ex
DWORD static_size; 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, 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 **rw_data, DWORD rw_size, void **dynamic_data, DWORD dynamic_size,
void **static_data, DWORD static_size, DWORD *count, DWORD unk2 ); 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 ...@@ -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 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 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 param_type, void *data, DWORD data_size, DWORD data_offset );
DWORD WINAPI NsiGetParameterEx( struct nsi_get_parameter_ex *params );
#endif /* __WINE_NSI_H */ #endif /* __WINE_NSI_H */
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