The topic tells the problem.
IMeshSelect* ms = GetMeshSelectInterface(modi) ;
IMeshSelectData* msd = GetMeshSelectDataInterface(modi);
the modifier has IMeshSelect interface, but doesn’t have IMeshSelectData … 
The topic tells the problem.
IMeshSelect* ms = GetMeshSelectInterface(modi) ;
IMeshSelectData* msd = GetMeshSelectDataInterface(modi);
the modifier has IMeshSelect interface, but doesn’t have IMeshSelectData … 
You need to enumerate the modifiers modcontext with
Modifier::EnumModContexts ( ModContextEnumProc * proc )
then from the modcontext sent to the proc object function…
IMeshSelectData* msd = GetMeshSelectDataInterface(mc->localData);
as the selection is local to the mesh not the modifer