简体   繁体   中英

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.

I really want to use c# for this if it's possible.

All the searches I do for accessing devices/gpus in windows with c#, refer to using them for performance gains in your c# application.

I've looked into cudafy, but it seems this is another performance gaining thing and not what I'm looking for. 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. This interface is unrelated to graphics APIs like OpenGL and Direct3D.
  • 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).
  • Overclocking GUIs and GPU control panels are examples of userland programs that use the driver's hardware interface. 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. 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.
  • 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. 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#.
  • 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.
    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)
    3. Then write your GUI in C# that calls into that interface.
  • 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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