为什么genguid.exe生成clsid不会工作? [英] Why genguid.exe generated clsid won't work?

查看:305
本文介绍了为什么genguid.exe生成clsid不会工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从pywin演示修改exceladdin.py示例。

I am trying to modify exceladdin.py example from pywin demos.

否则,我可以修改它,但是当我替换示例中给出的clsid:

Otherwise I can modify it, but when I replace the clsid given in example:

"{C5482ECA-F559-45A0-B078-B2036E6F011A}"

由genguid.exe或pythoncom.CreateGuid()生成的例如:

With the one generated by genguid.exe or pythoncom.CreateGuid() e.g.:

"{E44EF798-7FDF-4015-AED6-00234CBBBA77}"

加工。没有跟踪,没有错误只是以下文本在excel com对象列表(翻译)加载项未加载。运行时加载com对象时出错。

The com-addin stops working. No trace, no errors just the following text in excel com-objects list (translation) "Add-in not loaded. Error in runtime while loading com object."

我缺少生成clsid的步骤?

Am I missing a step in generating clsid?

编辑:我想我发现问题... clsid是dll的id。在python的情况下,clsid是指pythoncomloader27.dll。这是正确的吗? ...但仍然无法加载正确的python文件。 clsid以某种方式链接到pythoncomloader和原始的pythonfile。如果我生成一个新的clsid,我必须链接到pythonloader?如何?

I think I found the problem... clsid is the id of the dll. In the case of python, the clsid refers to pythoncomloader27.dll. Is this right? ...but still I can't load the correct python file. The clsid is somehow linked to pythoncomloader and the original pythonfile. If I generate a new clsid, I have to link it to pythonloader? How?

推荐答案

好的,我认为我找到了答案...

Ok, I think that I found the answer...

python不能安装在程序文件文件夹中,除非您以root用户身份运行所有文件(admin)。

python cannot be installed in "program files" folder unless you run everything as root (admin).

注册com服务读/写入< pythonInstallationDir> / Lib / win32com / gen-py 目录。 Word(或使用com服务的程序)也必须能够写入(?)。有非人类可读的字典等。

The python program that registers the com-service reads/writes <pythonInstallationDir>/Lib/win32com/gen-py directory. Word (or the program that uses the com service) has to be able to write(?) there as well. There exists non-human readable dictionary etc.

安装python到c:/ python27解决了我的问题。现在只有寄存器程序必须以root身份运行。 Word可以作为普通用户运行。我想在我的情况下,我弄错了字典第二次没有给予足够的权限(第一次正确地注册它),它是使用原始的密钥。

installing python to c:/python27 solved my problem. Now only the register program has to be run as root. Word can be run as normal user. I think in my case I messed up the dictionary by not giving enough privileges at the second time (first time I registered it correctly) and it was using the original keys.

这篇关于为什么genguid.exe生成clsid不会工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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