Fixed MSVC build, ported to Visual Studio 2012.
Implemented vectored exception handling so native code can be debugged while the soft debugger runs.