[Bug 797] Rewrite DirectX HAL interfaces