python加载windows COM接口

python加载windows COM接口,python,com,Python,Com,我注册了一个C#COM接口dll 使用 “c:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe”/codebase StepsToEveConverter.dll Microsoft.NET Framework程序集注册实用程序版本4.0.30319.34209 适用于Microsoft.NET Framework版本4.0.30319.34209 版权所有(C)微软公司。版权所有 RegAsm : warning RA0000 : R

我注册了一个C#COM接口dll 使用 “c:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe”/codebase StepsToEveConverter.dll

Microsoft.NET Framework程序集注册实用程序版本4.0.30319.34209 适用于Microsoft.NET Framework版本4.0.30319.34209 版权所有(C)微软公司。版权所有

RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications that may be i
talled on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re
egister it.
Types registered successfully
我已经安装了python 当我在命令提示符下键入python.exe时,它显示:

Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:16:59) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
我的Eclipse工具中的pyhon路径

为了测试我使用的COM功能

w=win32com.client.Dispatch("Word.Application")
w.Visible=1
谁按预期打开Word

但是当我尝试使用COM dll StepsToEveConverter.dll时,我得到

from comtypes.client import CreateObject
eveConverter = CreateObject("StepsToEveConverter");
给出错误:

...
        _ole32.CoCreateInstance(byref(clsid), punkouter, clsctx, byref(iid), byref(p))
      File "_ctypes/callproc.c", line 945, in GetResult
    WindowsError: [Error -2147221164] Class not registered
在regedit.exe HKEY_CLASSES_ROOT中,我有一个条目

在我安装了32位版本的Anaconda之后,它可以与此一起工作

import comtypes
import comtypes.client
eveConverter = comtypes.client.CreateObject("StepsToEveConverter");

在我安装了32位版本的Anaconda之后,它可以与此一起工作

import comtypes
import comtypes.client
eveConverter = comtypes.client.CreateObject("StepsToEveConverter");