MENU

Python调用大漠插件

March 19, 2020 • Read: 626 • Python阅读设置

注册大漠插件

安装 pypiwin32

import os
import win32com.client

os.system("regsvr32 D:/dm.dll /s")
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())
Last Modified: March 21, 2020
Leave a Comment

已有 1 条评论
  1. 1 1

    run as administrator