简体   繁体   English

Outlook赎回-在没有regsvr32 DLL的情况下使用RedemptionLoader

[英]Outlook Redemption - using RedemptionLoader without regsvr32 the DLL

I want to use the mail functions without registering the COM dll (regsvr32). 我想使用邮件功能而不注册COM dll(regsvr32)。 I followed the informations from: 我遵循了以下信息:

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

so i initialize the dll with 所以我用初始化了dll

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

which shows the Eval-Popup. 其中显示了Eval-Popup。 All good. 都好。 But when i assign the outlook mail item to the object 但是当我将Outlook邮件项目分配给对象时

 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'. 无法将类型为“ System .__ ComObject”的COM对象转换为接口类型为“ 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)). 该操作失败,因为具有以下错误的IID为'{0A95BE2D-1543-46BE-AD6D-18653034BF87}'的接口的COM组件上的QueryInterface调用由于以下错误而失败:不支持此类接口(HRESULT的异常:0x80004002(E_NOINTERFACE)) 。

After registering the dll with regsvr32 it works? 用regsvr32注册dll后,它可以工作吗? But i dont want that. 但是我不想要那样。

What am i doing wrong? 我究竟做错了什么?

EDIT: 编辑:

  • i tried it with registering the COM on the dev machine 我尝试了在开发机器上注册COM的尝试
  • removing the COM and use the Interop.Redemption.dll 删除COM并使用Interop.Redemption.dll

What it the intended way of using the Loader without registering the COM? 在不注册COM的情况下使用Loader的预期方式是什么?

Stepped over the trap of initializing the loader in the main Thread and calling methods in another... 跨过了在主线程中初始化加载程序并在另一个线程中调用方法的陷阱...

see Redemption + Clickonce = :-( 参见兑换+ Clickonce = :-(

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM