Helpers for working with Windows COM