本文整理汇总了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' }'
示例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' }'