Bernhard
Bernhard

Reputation: 2799

Outlook Redemption - using RedemptionLoader without regsvr32 the DLL

I want to use the mail functions without registering the COM dll (regsvr32). I followed the informations from:

http://www.dimastr.com/redemption/security.htm#redemptionloader

so i initialize the dll with

private Redemption.SafeMailItem safeMail = Redemption.RedemptionLoader.new_SafeMailItem();

which shows the Eval-Popup. All good. But when i assign the outlook mail item to the object

 safeMail.Item = mail; // of type Microsoft.Office.Interop.Outlook.MailItem

then this exception appears:

Unable to cast COM object of type 'System.__ComObject' to interface type 'Redemption.ISafeMailItem'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{0A95BE2D-1543-46BE-AD6D-18653034BF87}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

After registering the dll with regsvr32 it works? But i dont want that.

What am i doing wrong?

EDIT:

What it the intended way of using the Loader without registering the COM?

Upvotes: 1

Views: 1865

Answers (1)

Bernhard
Bernhard

Reputation: 2799

Stepped over the trap of initializing the loader in the main Thread and calling methods in another...

see Redemption + Clickonce = :-(

Upvotes: 2

Related Questions