Identical issue, invalid handle specified errors thrown inside the MSVC 2008 or 2010 IDE while the program works fine outside of it. Also D3dcreatedevice throws invalid handle specified errors at me...