private static void ThrowExceptionForHR(int result) { if (result < 0) throw new COMException(null, result); }