In a medium heavy-bottomed saucepan, combine the sugar, flour and salt. Gradually stir in the milk and eggs. Cook over medium heat, stirring constantly, until the mixture thickens and boils. Boil and stir for 2 minutes.
Remove from heat.
Stir in the sour cream, butter, and cranberries; pour mixture into the baked pastry shell. Cover with plastic wrap. Refrigerate for several hours or overnight.
Whip the cream until soft peaks form, fold in the confectioners' sugar and vanilla. Swirl over the top of the cooled and set pie.