首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >获取错误-2147220472 (无法启动Quickbook)

获取错误-2147220472 (无法启动Quickbook)
EN

Stack Overflow用户
提问于 2014-01-03 13:42:13
回答 1查看 3K关注 0票数 6

当我试图连接到Quickbook时,我得到了错误-2147220472。应用程序由windows服务执行。日志文件如下:

代码语言:javascript
复制
I   8788    RequestProcessor    ========= Started Connection =========
I   8788    RequestProcessor    Request Processor, QBXMLRP2 v12.0
I   8788    RequestProcessor    Connection opened by app named 'QBWatcher'
I   8788    RequestProcessor    OS: Microsoft Professional (build 9200), 64-bit
I   8788    RequestProcessor    Current Process is elevated
I   8788    RequestProcessor    Current User is in AdminGroup
I   8788    RequestProcessor    Current Process is ran as Admin
I   8788    RequestProcessor    Current Process Integrity Level : 3000
I   8788    RequestProcessor    Previous instance of QB is going down..! Wait and retry to get a new instance.
I   8788    RequestProcessor    Previous instance of QB is going down..! Wait and retry to get a new instance.
I   8788    RequestProcessor    Previous instance of QB is going down..! Wait and retry to get a new instance.
I   8788    RequestProcessor    Previous instance of QB is going down..! Wait and retry to get a new instance.
I   8788    RequestProcessor    Previous instance of QB is going down..! Wait and retry to get a new instance.
E   8788    RequestProcessor    Could not find or create an instance of QuickBooks using InstanceFinder
I   8788    RequestProcessor    Connection closed by app named 'QBWatcher'
I   8788    RequestProcessor    ========== Ended Connection ==========
I   8788    CertVerifier    The file does not contain an Authenticode signature.

这有时确实有效,但我看不出一个模式。是什么导致了这一切?

简而言之,用于连接的代码如下:

代码语言:javascript
复制
qbxmlConn.OpenConnection2(filename, "QBWatcher", QBXMLRP2Lib.QBXMLRPConnectionType.localQBD);
QBXMLRP2Lib.IAuthPreferences qbAuthPrefs = qbxmlConn.AuthPreferences;                                   
qbAuthPrefs.PutPersonalDataPref(QBXMLRP2Lib.QBXMLRPPersonalDataPrefType.pdpNotNeeded);
qbAuthPrefs.PutUnattendedModePref(QBXMLRP2Lib.QBXMLRPUnattendedModePrefType.umpOptional);
ticket = qbxmlConn.BeginSession(filename, QBXMLRP2Lib.QBFileMode.qbFileOpenDoNotCare);
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-01-03 18:48:39

这是这个问题的关键:

应用程序由windows服务执行。

由于QuickBooks的工作方式,尝试从QuickBooks服务连接到QuickBooks(例如,在后台运行的小程序,而不是带有GUI的最终用户程序)将永远无法可靠地工作。

QuickBooks使用GUI消息泵来驱动SDK --因此,如果没有可用的GUI (例如,在没有登录到机器的用户时运行的Windows服务),则SDK/API将不可用。

对坏消息很抱歉。*-/

你能让你的程序有一个简单的GUI,并且只在用户登录时才运行(如果用户需要离开计算机,可以锁定屏幕)吗?

票数 9
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20905010

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档