当前位置: 首页>>代码示例>>Python>>正文


Python DllRetracer.handleFailure方法代码示例

本文整理汇总了Python中dllretrace.DllRetracer.handleFailure方法的典型用法代码示例。如果您正苦于以下问题:Python DllRetracer.handleFailure方法的具体用法?Python DllRetracer.handleFailure怎么用?Python DllRetracer.handleFailure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dllretrace.DllRetracer的用法示例。


在下文中一共展示了DllRetracer.handleFailure方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: handleFailure

# 需要导入模块: from dllretrace import DllRetracer [as 别名]
# 或者: from dllretrace.DllRetracer import handleFailure [as 别名]
    def handleFailure(self, interface, methodOrFunction):
        # Catch when device is removed, and report the reason.
        if interface is not None:
            getDeviceRemovedReasonMethod = interface.getMethodByName("GetDeviceRemovedReason")
            if getDeviceRemovedReasonMethod is not None:
                print r'        if (_result == DXGI_ERROR_DEVICE_REMOVED) {'
                print r'            HRESULT _reason = _this->GetDeviceRemovedReason();'
                print r'            retrace::failed(call, _reason);'
                print r'            exit(EXIT_FAILURE);'
                print r'        }'

        Retracer.handleFailure(self, interface, methodOrFunction)
开发者ID:janesma,项目名称:apitrace,代码行数:14,代码来源:dxgiretrace.py

示例2: handleFailure

# 需要导入模块: from dllretrace import DllRetracer [as 别名]
# 或者: from dllretrace.DllRetracer import handleFailure [as 别名]
    def handleFailure(self, interface, methodOrFunction):
        if methodOrFunction.name in self.createDeviceMethodNames:
            print r'        exit(EXIT_FAILURE);'
            return

        # https://msdn.microsoft.com/en-us/library/windows/desktop/bb324479.aspx
        if methodOrFunction.name in ('Present', 'PresentEx'):
            print r'        if (_result == D3DERR_DEVICELOST) {'
            print r'            exit(EXIT_FAILURE);'
            print r'        }'

        Retracer.handleFailure(self, interface, methodOrFunction)
开发者ID:p-podsiadly,项目名称:apitrace,代码行数:14,代码来源:d3d9retrace.py

示例3: handleFailure

# 需要导入模块: from dllretrace import DllRetracer [as 别名]
# 或者: from dllretrace.DllRetracer import handleFailure [as 别名]
    def handleFailure(self, interface, methodOrFunction):
        # Catch when device is removed, and report the reason.
        if interface is not None:
            print r'        if (_result == DXGI_ERROR_DEVICE_REMOVED) {'
            getDeviceRemovedReasonMethod = interface.getMethodByName("GetDeviceRemovedReason")
            if getDeviceRemovedReasonMethod is not None:
                print r'            HRESULT _reason = _this->GetDeviceRemovedReason();'
                print r'            retrace::failed(call, _reason);'
            getDeviceMethod = interface.getMethodByName("GetDevice")
            if getDeviceMethod is not None and len(getDeviceMethod.args) == 1:
                print r'            com_ptr<%s> _pDevice;' % getDeviceMethod.args[0].type.type.type
                print r'            _this->GetDevice(&_pDevice);'
                print r'            HRESULT _reason = _pDevice->GetDeviceRemovedReason();'
                print r'            retrace::failed(call, _reason);'
            print r'            exit(EXIT_FAILURE);'
            print r'        }'

        Retracer.handleFailure(self, interface, methodOrFunction)
开发者ID:p-podsiadly,项目名称:apitrace,代码行数:20,代码来源:dxgiretrace.py


注:本文中的dllretrace.DllRetracer.handleFailure方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。