Move common win32 definitions into an internal module and make the WinRT driver work using WinAPI, too.