Todo: 集成多平台 解决因SaiNiu线程抢占资源问题 本地提交测试环境打包 和 正式打包脚本与正式环境打包bat 提交Python32环境包 改进多日志文件生成情况修改打包日志细节
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Class factory utilities.
|
||||
import pythoncom
|
||||
|
||||
|
||||
def RegisterClassFactories(clsids, flags=None, clsctx=None):
|
||||
"""Given a list of CLSID, create and register class factories.
|
||||
|
||||
Returns a list, which should be passed to RevokeClassFactories
|
||||
"""
|
||||
if flags is None:
|
||||
flags = pythoncom.REGCLS_MULTIPLEUSE | pythoncom.REGCLS_SUSPENDED
|
||||
if clsctx is None:
|
||||
clsctx = pythoncom.CLSCTX_LOCAL_SERVER
|
||||
ret = []
|
||||
for clsid in clsids:
|
||||
# Some server append '-Embedding' etc
|
||||
if clsid[0] not in ["-", "/"]:
|
||||
factory = pythoncom.MakePyFactory(clsid)
|
||||
regId = pythoncom.CoRegisterClassObject(clsid, factory, clsctx, flags)
|
||||
ret.append((factory, regId))
|
||||
return ret
|
||||
|
||||
|
||||
def RevokeClassFactories(infos):
|
||||
for factory, revokeId in infos:
|
||||
pythoncom.CoRevokeClassObject(revokeId)
|
||||
Reference in New Issue
Block a user