的OpenGL / DirectX的钩 - 以FRAPS类似 [英] OpenGL/DirectX Hook - Similar to FRAPS

查看:245
本文介绍了的OpenGL / DirectX的钩 - 以FRAPS类似的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

时有可能发现哪些应用程序正在使用OpenGL或DirectX类似于FRAPS呢? (可能使用某种形式的挂钩)?我可能不会需要真正绘制到窗口,我只需要知道哪些进程正在做某种形式的3D渲染暂且

Is it possible to detect what applications are using OpenGL or DirectX similar to what FRAPS does? (Possibly using some form of hook)? I probably won't need to actually draw to the window, I just need to know what processes are doing some form of 3D rendering for the time being.

(编辑: )
如果你不熟悉它,FRAPS是可以用来绘制在3D应用程序中的帧每秒专柜的程序。 FRAPS发现自身所有正在运行的3D应用程序,而无需您指定的进程名。

() In case you are not familiar with it, FRAPS is a program that can be used to draw a "Frame-per-second" counter on a 3D application. FRAPS finds all running 3D applications by itself without needing you to specify the process name.

的帧每秒反吸引到外部的比赛举例:

Example of "Frame Per second" counter drawn to external game:

推荐答案

也许最简单的方法是检查了OpenGL的存在和DirectX核心库,大概也是一个好主意,在驱动程序中加入过多(如nvogl),这可以通过的 EnumProcesses &安培; EnumProcessModulesEx ,使用p / Invoke,这至少可以给你一个起点一套可能使用OGL或DX过程。

Probably the simplest way is to check for the presence of the OpenGL and DirectX core libraries, probably also a good idea to add in the driver OGL dlls in too (such as nvogl), this can be done via EnumProcesses & EnumProcessModulesEx, using p/invoke, this will at least give you a starting set of processes possibly using OGL or DX.

当然,某些应用程序加载两个的API和只使用一个,或者是有条件使用
之一GFX的API(尽管后者只能用专门的工具和等时),为此,国际海事组织,检查最好的办法就是进行某种形式的注射
或附加到这个过程就像一个调试器会,然后钩住要么目前为DX或 wglSwapBuffers 为OGL。

Of course some applications load both of the API's and use only one, or only conditionally use one of the GFX API's (though the latter only occurs with specialized tools and the like), for this, IMO, the best way to check is to perform some form of injection or attaching to the process like a debugger would, then hooking either Present for DX or wglSwapBuffers for OGL.

您可能即将通过枚举GDI处理,并寻找DXGI或OGL渲染上下文逃脱不使用挂钩,如何可行的这是,我不知道。

You might be about to get away with not using a hook by enumerating the GDI handles and looking for the DXGI or OGL render contexts, how viable this is, I don't know.

这篇关于的OpenGL / DirectX的钩 - 以FRAPS类似的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆