python 免注册调用dm

因为需要使用大漠插件

注册com组件能调用,但是免注册的没找到资料,故折腾了一番

#注册大漠插件
import win32com.client
dm = win32com.client.Dispatch('dm.dmsoft')
print(dm.Ver())

# 免注册大漠插件
import ctypes
from comtypes.client import CreateObject
dms = ctypes.windll.LoadLibrary(r'DmReg.dll')
dms.SetDllPathW(r'dm.dll', 0)
dm = CreateObject('dm.dmsoft')
print(dm.Ver())

 

 

posted @ 2019-11-06 19:17  烟雨半生  阅读(2938)  评论(0编辑  收藏  举报