none
Using redemption.dll in my outlook add-in which should work for 32 and 64 bit office outlook

    Question

  • My outlook add-in is compiled with platform target as "Any CPU" and it works fine in 32 and 64 bit outlook now.

    I want to use redemption.dll in my add-n to extent some functionality. I saw there are two versions of dlls in the downloaded redemption package (redemption.dll and redemption64.dll) I want to use similar code below to use the dll in my add-in

    Type t = Type.GetTypeFromProgID("MyDll.MyMailItem");
    SafeMailItem sItem = (SafeMailItem) Activator.CreateInstance(t);

    In this case which dll I refer to my project? redemption.dll OR redemption64.dll ?

    How my project loads correct dll in 32 bit office and 64 bit office?


    • Edited by jack_jj Wednesday, August 28, 2013 7:16 PM mispelled CPU as CP
    Wednesday, August 28, 2013 7:11 PM

Answers

  • The correct dll will be loaded by the COM system, not your code.

    As long as both versions are correctly installed and registered in the registry, your code will work without any modifications. Note however that you will not be bale to install the 64 bit version of the dll on a 32 bit machine.

    You might want to look into using RedemptionLoader - you will skip COM registration completely, and RedemptionLoader will load the right dll for you based on the process bitness.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by jack_jj Thursday, August 29, 2013 8:03 PM
    Wednesday, August 28, 2013 7:57 PM