Home > Back-end >  How to access the computer com components are QAxObject?
How to access the computer com components are QAxObject?

Time:12-06

Before a project using QAxObject processing excel spreadsheets, on the client computer often will encounter all sorts of problems, different editions of Microsoft office excel, or install the WPS, whether activation is often a problem, such as the component interface excel is setControl (" excel. Application "), the WPS is setControl (" Ket. Application "), have long suspected that the WPS interface, the call ever install Microsoft office excel all have an effect on it, but the computer can't frequent reshipment system, this problem has been, and the computer with a solid, installed the system, and only the WPS, when run the project, this piece has been prompt

Onecore \ com \ combase \ dcomrem \ resolver CXX (2483) \ combase DLL! 76 cb3864: caller: 76 c9e016 ReturnHr (9) dar fc4 (3) 80040154 not registered class
QAxBase: : setControl: requested control Ket. Application could not be instantiated

Then all kinds of check, found the WPS installation to the current user is the default installation, only the user registries with kingsoft in table, not in the machine table, had been suspected to be the WPS installation has a problem, change the version, with administrator privileges to run the installation to use, as if the WPS can only be installed to the current user, install this road impassability, just thinking of com components of qt is how to access the computer, there seems to be no related description in the document, help bosses!

CodePudding user response:

When installation should be an option will work for all users, have the general software

CodePudding user response:

reference 1/f, Simple, Soft reply:
when installation should be an option will work for all users, general software has the
well, a long time, and the WPS seems to have no, looking for a long time didn't find it

CodePudding user response:

Progress at present: don't know how to, is to install have a problem or in a registry HKEY_CLASSES_ROOT \ KET. Application nodes exist, clsids also exist, but do not check in HKEY_CLASSES_ROOT \ clsids \ corresponding clsids nodes, call CLSIDFromProgID return CO_E_CLASSSTRING (Invalid class string), check the MSDN CLSIDFromProgID interface definition also didn't see this interface is to check which table, if HKEY_CLASSES_ROOT \ KET Application \ clsids this logic, should be can return, but not the actual; At the same time call ProgIDFromCLSID check above KET. Application corresponding clsids, found that return REGDB_E_CLASSNOTREG (Class not registered), the how to check, circle

CodePudding user response:

Refer to https://www.cnblogs.com/starpnd/p/3641144.html
Modify the registry method:
Manual in the machine table clsids and typeLib added WPS registry, no effect after restart, don't know if there a lot of things, not only add this one; To import, then refer to the above methods, found no effect CLSIDFromProgID, but through ProgIDFromCLSID can initialize the success (manually add may be problematic, in front of the suggested a direct export and import, import double-click directly export had modified the registry file), and later added \ HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes \ KET Application this node, called CLSIDFromProgID can be successful,
Accomplished here thought, never expected, when directly use the program testing, program crashes,
Error: "paramTypeNames. The size ()==paramNames. The size ()" in the file. \ qaxbase CPP, line 3069
Debug the Error!
However, with the WPS super administrator user login, the test program was successful, so the import registration table in front of the method should be no also exported to the interface, so the interface can't access, lead to collapse,
,,,

Install 2010 version:
WPS2019 uninstalled, installed wps2010 (http://xiazai.zol.com.cn/detail/45/440291.shtml#hotArticle), to check the registry found no kingsoft and ket. The application, finally found the ET. The application, the corresponding path is just install wps2010, then use program CLSIDFromProgID (OLESTR (" ET. Application "), & amp; Clsids) test, and return a success, but for now the basic need not this version, so can't as a solution,

CodePudding user response:

This kind of matter directly consult the official!
Don't know the development document and demo can help to you:
https://open.wps.cn/docs/office
https://code.aliyun.com/zouyingfeng/wps/tree/master/cpp
  • Related