def SetInterfaceSafetyOptions(self, iid, optionsMask, enabledOptions):
# trace ("SetInterfaceSafetyOptions", iid, optionsMask, enabledOptions)
if optionsMask & enabledOptions == 0:
return
# See comments above.
# if (optionsMask & enabledOptions & \
# ~(axscript.INTERFACESAFE_FOR_UNTRUSTED_DATA | axscript.INTERFACESAFE_FOR_UNTRUSTED_CALLER)):
# # request for options we don't understand
# RaiseAssert(scode=winerror.E_FAIL, desc="Unknown safety options")
if iid in [pythoncom.IID_IPersist, pythoncom.IID_IPersistStream, pythoncom.IID_IPersistStreamInit,
axscript.IID_IActiveScript, axscript.IID_IActiveScriptParse]:
supported = self._GetSupportedInterfaceSafetyOptions()
self.safetyOptions = supported & optionsMask & enabledOptions
else:
raise Exception(scode=winerror.E_NOINTERFACE)
评论列表
文章目录