modify for XP and VS2008