In a pot off the heat, whisk together the sugar, cornstarch and flour. Add the eggs and whisk until smooth. Add the milk and vanilla. Bring to a boil over medium heat, whisking constantly and scraping the sides and bottom of the pot, until thickened. Strain the pastry cream, if needed. Transfer to a bowl and cover with plastic wrap directly on the surface of the cream. Refrigerate for 3 hours or until completely chilled.