Update to VS2012 and use new API