2

I'm trying to incorporate outlook redemption into a C# project (VS2015 Enterprise), I downloaded the dll's and used regsrv32 to register the 64 bit DLL, then added a reference within the C# project.

When running the application I get 'Wrong OS or OS version' when creating the RDOSession?

        var Session = new RDOSession();
        Session.Logon("", "", false, false, null, false);
        var Inbox = Session.GetDefaultFolder(rdoDefaultFolders.olFolderInbox);

        foreach (var Msg in Inbox.Items) {
            Console.WriteLine(Msg);
        }
Mrk Fldig
  • 4,244
  • 5
  • 33
  • 64
  • 1
    how have you referenced the DLL in the project? – Simon Price Oct 31 '16 at 09:29
  • So from downloads I did regsvr32 Redemption64.dll then went to Add Reference->COM->Redemption(rather than browse and selecting the the one in downloads) – Mrk Fldig Oct 31 '16 at 09:33
  • I assume everything builds ok too? – Simon Price Oct 31 '16 at 10:18
  • Yeah it's fine, actually rather embarrassingly I have a sneaky suspicion office 365 defaults to 32 bit rather than installing the OS version, I'm just out at the moment and will check in a lil while! – Mrk Fldig Oct 31 '16 at 10:20
  • Hey Simon right it was because Office 365 defaults to 32 bit regardless of OS, basically you need to make sure your application and outlook are both either 32 or 64 bit you can't mix and match for obvious reasons. Since you got me thinking along those lines post an answer and I'll mark it as correct. – Mrk Fldig Oct 31 '16 at 10:54

1 Answers1

4

It means the bitness of your app is different from the bitness of Outlook/MAPI system. Please see http://www.dimastr.com/redemption/faq.htm#ErrorCreatingRedemptionObject

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • Hey Dmitry yeah silly me I didn;t notice the microsoft installer didn't bother checking the bitness of the OS and just installed the 32 bit one regardless! – Mrk Fldig Oct 31 '16 at 15:44