1

I am trying to display the SelectNamesDialog in Outlook 2010, using Redemption in C#, but I am getting the exception "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." on the third line below:

RDOSession rdoSess = new RDOSession();
rdoSess.MAPIOBJECT = Reflection.GetProperty(Application.Session, "MAPIObject");
RDOSelectNamesDialog dlg = rdoSess.GetSelectNamesDialog();

My Outlook application object is valid (the standard SelectNamesDialog works ok) and I am using reflection to get the MAPIObject property from the session as it does not appear in the intellisense.

I have downloaded the latest version of Redemption and have referenced the Interop.Redemption file. I am running Windows 7 32-bit and Visual Studio 2010, using the .NET 4 Framework.

Has anyone else seen this error before? I suspect I am doing something wrong, but my code seems to match the Redemption samples I have found online.

Any help would be gratefully received!

Thanks in advance,

Nathan.

  • What is the value of the rdoSess.Version property? – Dmitry Streblechenko Jan 21 '14 at 13:28
  • Hi Dmitry, rdoSess.Version = "5.0.0.2174" – BoiledOnion Jan 22 '14 at 14:49
  • RDOSession.GetSelectNames dialog was added in version 5.1. Are you sure you installed the latest version of Redemption? – Dmitry Streblechenko Jan 23 '14 at 15:06
  • You are absolutely right! It looks like I had an older version registered elsewhere on the PC, so it wasn't using the DLL I thought it was! I've registered the new one and the dialog now displays. Thank you so much for your help! Can't believe it was such a simple solution. Thanks again, Nathan. – BoiledOnion Jan 24 '14 at 12:13
  • Every time you get an access violation error in .Net, it pretty much means .Net tried to invoke a method past the v-table. That can only happen if you are calling a method that was not present in the older versions. – Dmitry Streblechenko Jan 24 '14 at 16:45

0 Answers0