Why does touch input work in old apps on microsoft surface?

When the developers wrote these apps, microsoft surface wasnt on the market yet.. so how come apps that were made in 97/98 for instance, touch input works?? isnt there a touch screen api that every developer must enable before their apps can work on the surface?