2016-01-29 133 views
0

我创建在C#一个DLL,它作为一个参数莲花打印Lotus Notes文档用C#DLL

Domino服务器的名称,数据的基础上的Lotus Notes和UNID的名称这个dll的目标是在读取模式下打开具有 UNID作为参数传递的文档,然后通过安装在机器上的打印机打印文档。问题是,有时DLL而不是公开文件中指出,它打开连接本文档中的附件,并生成 以下异常:

COMException.Message = L'objet invoqué s'est déconnecté de ses clients. (Exception de HRESULT : 0x80010108 (RPC_E_DISCONNECTED)) 
COMException.ErrorCode = -2147417848 
COMException.ToString = System.Runtime.InteropServices.COMException (0x80010108): L'objet invoqu‚ s'est d‚connect‚ de ses clients. (Exception de HRESULT : 0x80010108 (RPC_E_DISCONNECTED)) 
    … System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) 
    … System.Dynamic.ComRuntimeHelpers.GetITypeInfoFromIDispatch(IDispatch dispatch, Boolean throwIfMissingExpectedTypeInfo) 
    … System.Dynamic.IDispatchComObject.EnsureScanDefinedMethods() 
    … CallSite.Target(Closure , CallSite , ComObject , Int32 , Int32 , Int32 , Boolean) 
    … CallSite.Target(Closure , CallSite , Object , Int32 , Int32 , Int32 , Boolean) 
    … PrintNotesUIDocumentCOM_version_14_12_2015.PrintNotesDocument_version_14_12_2015.PrintFaxDocument_version_14_12_2015(String serverName, String baseName, String UNID) 
COMException.Data = System.Collections.ListDictionaryInternal 
+0

请显示您的代码。 –

+0

你正在从错误的一端调试它。服务器摔倒了,它不在了。这就像在电话上与朋友交谈,你突然听到“哔,哔,哔”的声音。你不知道他是否意外撞到了电话钩或他的房子被烧毁。 –

+0

@RichardSchwartz:代码已发布,可以帮助吗? –

回答

0

这是非常有可能的是文档的形式具有表单属性“汽车启动“设置为”-First OLE Object-“或”-First Attachment-“。
将其设置为“ - 无 - ”。

如果它已经是“-None-”,那么查看窗体和子窗体的QueryOpen()和PostOpen()事件。可能有附件执行的代码。

+0

我已经检查,它已被定义为“ - 无 - ” –

+0

我已经检查了表单,并且没有任何QueryOpen()或PostOpen()事件 –

+0

这是dll的代码,可能是帮助: –