Modified for vs2008 on windows7