@
Sin;
Yes it is possible in C/C++ but not natively in Java. If you want to do this in Java, you'd be wasting your time because you'd be writing the C++ code into a .dll anyway and loading that with Java.. lol.
What he linked above will do it via the Windows COM dll's. Specifically you want to include:
and also link to: Ole32.lib or Ole32.a. There's other ways to do it without the COM dll's but it'd require rolling your own. There's actually a ton of Undocumented functions that do this sort of thing (but of course no documentation on usage). I think the temperature is easy enough though and it's documented so stick to the COM.
The third way I can think of doing it is to write a KernelMode driver to do it for you. That's going to take practice though and good knowledge which I have no doubt that you have. Just lots of reading will be required. <-- That I doubt you want to do (try almost a whole book's worth)
As for making the GPU wait, yeah.. I did it via the following. If you want something specific to OpenGL you can use gDebugger to stall specific apps. The following can be used for anything though and it's an out of context snippet.
C++ Code:
while(true)
{
if (!(GetAsyncKeyState(VK_F1) & 1))
{
std::this_thread::sleep_for(std::chrono::seconds(100));
}
break;
}
I inserted that into any function I wanted the GPU to pause on. You can simply insert it into a dummy function and have the GPU run that. Bam. GPU stall. Another way is to do a System hook:
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
and hook all running services and processes on the system. Then if they call any GDI functions, you simply stall it using the above code.
Another idea is to just subclass every window and stall again in the WM_PAINT using the above. Then again, you can always use Assembly
Any reasons you want to do this? It's highly NOT recommended to just "Stall" the GPU "system wide". Stalling for specific applications is usually the recommended approach.