简体   繁体   English

是否可以使用C#在Windows中访问和修改谨慎的GPU设置

[英]Is it possible to access and modify discreet gpu settings in windows using c#

I'm trying to make a overclocking application for windows that can detect you gpu settings and overclock it's core and memory to it's max stable potential. 我正在尝试为Windows开发一个超频应用程序,该应用程序可以检测到您的GPU设置并将其核心和内存超频到最大稳定潜力。

I really want to use c# for this if it's possible. 如果可能的话,我真的很想为此使用c#。

All the searches I do for accessing devices/gpus in windows with c#, refer to using them for performance gains in your c# application. 我使用c#访问Windows中的设备/ gpu所做的所有搜索,请参阅在c#应用程序中使用它们来提高性能。

I've looked into cudafy, but it seems this is another performance gaining thing and not what I'm looking for. 我已经研究过cudafy,但这似乎是另一项获得性能提升的东西,而不是我想要的东西。 I don't know maybe I'm not looking for the right thing. 我不知道我是否在寻找正确的东西。 Any help on this would be great. 任何帮助都会很棒。

Thanks 谢谢

Short answer: No. 简短答案:不可以。

Long answer: Yes, but... 长答案:是的,但是...

  • GPU parameters are set via your GPU's driver's hardware control interface. GPU参数是通过GPU驱动程序的硬件控制界面设置的。 This interface is unrelated to graphics APIs like OpenGL and Direct3D. 此接口与OpenGL和Direct3D等图形API无关。
  • The hardware control interface is generally undocumented because GPU makers don't want to have to support third-party developers or those offering hardware modification tools (not least because of the very real risk of hardware damage from incorrect overclocking and the risk of fraudulent warranty returns). 硬件控制界面通常是未公开的,因为GPU制造商不想支持第三方开发人员或提供硬件修改工具的开发人员(尤其是因为错误的超频确实会造成硬件损坏的真正风险以及欺诈性的保修退货风险) )。
  • Overclocking GUIs and GPU control panels are examples of userland programs that use the driver's hardware interface. 超频GUI和GPU控制面板是使用驱动程序的硬件接口的用户界面程序的示例。 The developers of third-party overclocking tools will use computer software reverse-engineering techniques to see what the first-party software (eg GPU control panel) does. 第三方超频工具的开发人员将使用计算机软件逆向工程技术来查看第一方软件(例如GPU控制面板)的功能。 This is necessary because the hardware control interfaces are not documented (ie there's no C .h header files and .lib files that tell a compiler what functions do what and where they're located. 这是必需的,因为未记录硬件控制接口(即,没有.h头文件和.lib文件可以告诉编译器哪些功能做什么以及它们位于何处。
  • To use any programming interface from C# requires either a CIL metadata assembly (eg WinRT), COM interface, a Win32 DLL interface you can use with GetProcAddress or a C-style export. 要使用C#中的任何编程接口,都需要CIL元数据程序集(例如WinRT),COM接口,可与GetProcAddress使用的Win32 DLL接口或C样式的导出。 There exist none of those things for GPU hardware control interfaces - so you would have to develop your own, and then you can use C#. GPU硬件控制接口不存在这些东西-因此您必须开发自己的东西,然后才能使用C#。
  • So you would have to do this: 因此,您必须这样做:

    1. Run your GPU driver's proprietary overclocking program within a reverse-engineering debugger (like Hex Rays IDA) and carefully follow the program's execution to see what calls it makes to the kernel-mode hardware interface or the loaded kernel-mode graphics driver. 在逆向工程调试器(例如Hex Rays IDA)中运行GPU驱动程序专有的超频程序,并仔细跟踪该程序的执行,以查看其对内核模式硬件接口或加载的内核模式图形驱动程序的调用。
    2. Reimplement those calls in a language or platform that natively supports those calls that also can interop with the CLR (eg C++, COM, etc) 用本机支持也可以与CLR互操作的那些调用的语言或平台重新实现这些调用
    3. Then write your GUI in C# that calls into that interface. 然后用C#编写调用该接口的GUI。
  • Notable exception: AMD's Radeon's GUI control panel is (last time I checked) a .NET application - assuming they haven't obfuscated the CLR libraries they use to control the hardware you could probably reference those in your C# project directly and fiddle with settings that way. 显着的例外:AMD的Radeon的GUI控制面板是(我上次检查).NET应用程序-假设它们没有混淆它们用来控制硬件的CLR库,则可以直接引用C#项目中的硬件,并进行设置。方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM