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


Python DllRetracer.doInvokeInterfaceMethod方法代码示例

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


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

示例1: doInvokeInterfaceMethod

# 需要导入模块: from dllretrace import DllRetracer [as 别名]
# 或者: from dllretrace.DllRetracer import doInvokeInterfaceMethod [as 别名]
    def doInvokeInterfaceMethod(self, interface, method):
        Retracer.doInvokeInterfaceMethod(self, interface, method)

        # Keep retrying ID3D11VideoContext::DecoderBeginFrame when returns E_PENDING
        if interface.name == 'ID3D11VideoContext' and method.name == 'DecoderBeginFrame':
            print r'    while (_result == D3DERR_WASSTILLDRAWING || _result == E_PENDING) {'
            print r'        Sleep(1);'
            Retracer.doInvokeInterfaceMethod(self, interface, method)
            print r'    }'
开发者ID:janesma,项目名称:apitrace,代码行数:11,代码来源:dxgiretrace.py

示例2: doInvokeInterfaceMethod

# 需要导入模块: from dllretrace import DllRetracer [as 别名]
# 或者: from dllretrace.DllRetracer import doInvokeInterfaceMethod [as 别名]
    def doInvokeInterfaceMethod(self, interface, method):
        Retracer.doInvokeInterfaceMethod(self, interface, method)

        # Force driver
        if interface.name.startswith('IDXGIFactory') and method.name.startswith('EnumAdapters'):
            print r'    const char *szSoftware = NULL;'
            print r'    switch (retrace::driver) {'
            print r'    case retrace::DRIVER_REFERENCE:'
            print r'        szSoftware = "d3d11ref.dll";'
            print r'        break;'
            print r'    case retrace::DRIVER_SOFTWARE:'
            print r'        szSoftware = "d3d10warp.dll";'
            print r'        break;'
            print r'    case retrace::DRIVER_MODULE:'
            print r'        szSoftware = retrace::driverModule;'
            print r'        break;'
            print r'    default:'
            print r'        break;'
            print r'    }'
            print r'    HMODULE hSoftware = NULL;'
            print r'    if (szSoftware) {'
            print r'        hSoftware = LoadLibraryA(szSoftware);'
            print r'        if (!hSoftware) {'
            print r'            retrace::warning(call) << "failed to load " << szSoftware << "\n";'
            print r'        }'
            print r'    }'
            print r'    if (hSoftware) {'
            print r'        _result = _this->CreateSoftwareAdapter(hSoftware, reinterpret_cast<IDXGIAdapter **>(ppAdapter));'
            print r'    } else {'
            print r'        if (Adapter != 0) {'
            print r'            retrace::warning(call) << "ignoring non-default adapter " << Adapter << "\n";'
            print r'            Adapter = 0;'
            print r'        }'
            Retracer.doInvokeInterfaceMethod(self, interface, method)
            print r'    }'
            return

        if interface.name.startswith('IDXGIFactory') and method.name == 'CreateSoftwareAdapter':
            print r'    const char *szSoftware = NULL;'
            print r'    switch (retrace::driver) {'
            print r'    case retrace::DRIVER_REFERENCE:'
            print r'        szSoftware = "d3d11ref.dll";'
            print r'        break;'
            print r'    case retrace::DRIVER_MODULE:'
            print r'        szSoftware = retrace::driverModule;'
            print r'        break;'
            print r'    case retrace::DRIVER_SOFTWARE:'
            print r'    default:'
            print r'        szSoftware = "d3d10warp.dll";'
            print r'        break;'
            print r'    }'
            print r'    Module = LoadLibraryA("d3d10warp");'
            print r'    if (!Module) {'
            print r'        retrace::warning(call) << "failed to load " << szSoftware << "\n";'
            print r'    }'
            Retracer.doInvokeInterfaceMethod(self, interface, method)

        # Keep retrying ID3D11VideoContext::DecoderBeginFrame when returns E_PENDING
        if interface.name == 'ID3D11VideoContext' and method.name == 'DecoderBeginFrame':
            print r'    while (_result == D3DERR_WASSTILLDRAWING || _result == E_PENDING) {'
            print r'        Sleep(1);'
            Retracer.doInvokeInterfaceMethod(self, interface, method)
            print r'    }'
开发者ID:p-podsiadly,项目名称:apitrace,代码行数:65,代码来源:dxgiretrace.py


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