In a saucepan, combine sugar, flour, and salt; gradually stir in milk and chocolate squares. Cook and stir over medium heat till bubbly. Continue cooking and stirring for 2 minutes.
Remove from heat. Stir small amount hot mixture into yolks; immediately return to burner cook 2 minutes, stirring constantly. Remove from heat. Add butter and vanilla, and before you remove the mixture from the stove stir in the cream cheese, and mix well. Pour into a cooled baked pie shell.