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

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

#dll的路径一定要绝对路径,不然会报错。