In my outlook add-in, I create new rdoSession object and set mapi object each time I need to make use of the rdoSession objects as following.
Redemption.RDOSession session = Redemption.RedemptionLoader.new_RDOSession(); session.MAPIOBJECT = outlookApplicaitonObject.Session.MAPIOBJECT;
Is there a possibility to have one static Redemption.rdoSession object globally, so I can call it whenever I want to make use of it ? I declared a static RdoSession object and it throws following exception sometimes.
Unable to cast COM object of type 'System.__ComObject' to interface type 'Redemption.IRDOSession'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{E54C5168-AA8C-405F-9C14-A4037302BD9D}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))
What is the reason for this and is it possible to do what I'm trying to do ?