Note that, as the page says, this function expects an MSSQL *Link* resource, not a *result* resource. This is a bit counter-intuitive, and differs from, for instance, pg_affected_rows (though not, apparently, mysql_affected_rows).
$link = mssql_pconnect($db_host,$db_user,$db_pass);
$result = mssql_query('Select 1', $link);
$rows = mssql_rows_affected($result); # ERROR!
$rows = mssql_rows_affected($link); # Correct