CreateObject(“Redemption.RDOSession”) returns error code 800401FA

Deadly 提交于 2019-12-11 17:57:02

问题


I'm trying to use the redemption library in my script now and I can't load it.

Set m_objRDOSession = CreateObject("Redemption.RDOSession")

I have also tried to load it directly like the following

Set m_objRDOSession = GetObject("Redemption.dll", "Redemption.RDOSession")

Both the same error code, with null message and source.

I'm using windows 64 bit with outlook 32 bit. I have successfully loaded the library with c# and the redemption loader on the same machine.

PS: I should mention that I saw the terms and agreement prompt before the error got thrown.

What can I do?


回答1:


Error code 0x800401FA is CO_E_WRONGOSFORAPP.

If the machine is 64 bit, you will end up using the 64 bit version of cscript.exe, but the bitness of your code must match the bitness of Outlook - use cscript.exe from the SysWow64 folder.

Extended MAPI is a set of dlls loaded in-proc, and a 64 bit process cannot load a 32 bit dll and vice versa.

See http://www.dimastr.com/redemption/faq.htm#ErrorCreatingRedemptionObject for more details.




回答2:


Did you register the DLL to the machine?

Using CreateObject must have the COM object in the local registry.

In C# you can load the library without registering it using the RedemptionLoader class, but this method can not be used in VBScript.



来源:https://stackoverflow.com/questions/18598284/createobjectredemption-rdosession-returns-error-code-800401fa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!