出现错误-2147220472(无法启动快速手册) [英] Getting error -2147220472 (Could not start Quickbooks)

查看:207
本文介绍了出现错误-2147220472(无法启动快速手册)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试连接到Quickbooks时出现错误-2147220472.该应用程序由Windows服务执行.日志文件如下:

I am getting error -2147220472 when I try to connect to Quickbooks. The application is executed by a windows service. The log file is as follows:

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.

这有时确实有效,但我看不到任何模式.可能是什么原因造成的?

This actually works at times, but I can't see a pattern. What might be causing this?

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

In a nutshell, the code being used to connect is as follows:

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);

推荐答案

这是此问题的关键:

该应用程序由Windows服务执行.

The application is executed by a windows service.

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

Due to the way QuickBooks works, trying to connect to QuickBooks from a Windows service (e.g. a little program that sits and runs in the background instead of an end-user program with a GUI) will never work reliably.

QuickBooks使用GUI消息泵为SDK供电-因此,如果没有可用的GUI(例如,即使没有用户登录到计算机,Windows服务也可以运行),则SDK/API将不会可用的.

QuickBooks uses a GUI message pump to power the SDK - so if there's no GUI available (e.g. like in a Windows service that runs even when there are no users logged on to the machine) then the SDK/API won't be available.

很抱歉这个坏消息. :-/

Sorry for the bad news. :-/

您能否使您的程序具有简单的GUI并仅在用户登录时运行(如果他们需要离开计算机,请锁定屏幕)才能运行?

Can you make your program have a simple GUI and only run when a user is logged on (lock the screen if they need to leave the computer) instead?

这篇关于出现错误-2147220472(无法启动快速手册)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆