'Exchange version from VSTO Add-In

Is there a simple way to retrieve the Exchange version from a VSTO Add-In. I noticed here that WMI might be an option. I would like to avoid powershell.



Solution 1:[1]

Exchange server version is stored in the 0x663B0102 property in the store's profile section. In older versions of Outlook (2003 and below) in 0x661B0003. It is only accessible through Extended MAPI (C++ or Delphi) - read PR_EMSMDB_SECTION_UID from IMsgStore, use it to call IMAPISession::OpenProfileSection, read 0x663B0102 from IProfSect.

If using Redemption (any language - I am its author) is an option, it exposes RDOSession.ExchangeMailboxServerVersion and RDOExchangeMailboxStore.ServerVersion properties.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1