Imported most of the interop code needed for WinMM sound driver support