?
Solved

Programmatically setting/checking video hardware acceleration level on Windows 2000/XP

Posted on 2003-03-25
6
Medium Priority
?
1,540 Views
Last Modified: 2013-12-03
I have the following problem: I want to be able to check and set the video hardware acceleration level (graphics acceleration) under Windows 2000 and Windows XP. Windows 95/98/ME/NT are not an issue (see solution by 'glim').

Does anybody know how to accomplish this *programmatically*, preferrably in VC++ 6.0. I have tried observing the changes in the registry, but I can't figure out the correct things to change to make it work each time and on arbitrary graphics adapters.
0
Comment
Question by:danielsson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 2

Author Comment

by:danielsson
ID: 8203652
I found a solution myself. Anyone interested?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8204518
Yes.  Please post your solution (that will improve the EE "PAQ" database), then request a refund.  Info on closing questions is here:
    http://www.apollois.com/EE/Help/Closing_Questions.htm#Refund
-- Dan
0
 
LVL 2

Author Comment

by:danielsson
ID: 8208637
A solution can be found here:

http://www.experts-exchange.com/Community_Support/Q_20563401.html

How can I find the PAQs? Or do I have to be a paying member to view those?
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 49

Expert Comment

by:DanRollins
ID: 8208681
You just need to register.  There should be a link in the top right corner near the search button.  Also many questions are indexed by google.  This link pre-sets google to search just the EE site:

    http://www.google.com/advanced_search?&as_sitesearch=experts-exchange.com

-- Dan
0
 
LVL 2

Author Comment

by:danielsson
ID: 8209997
Now for the solution I spoke of. I'm sorry that I'm not yet used to the EE customs here... :)

I have tested the solution to work on Windows 2000 with a Matrox G450 DH and on Windows XP with some ATI graphics adapter. No warranty, but it looks like it is a general solution for XP/2K.

It works as follows:

(1) Find out the position of the current video device, information on this may be found in the registry, here:
   \\HKLM\HARDWARE\DEVICEMAP\VIDEO\Device\Video0
   There you will find a LPSTR type of entry, pointing to a registry key for the current video device, e.g.
   "\Registry\Machine\System\ControlSet001\Services\G400\Device0"
(2) Parse that string, replacing "\Registry\Machine" with HKLM (HKEY_LOCAL_MACHINE) and open the corresponding registry key,
(3) Look for a DWORD value "Acceleration.Level". If the value does not exists, hardware acceleration is set to "Full". Otherwise, "Acceleration.Level" may be one of 0x1 to 0x5, 0x5 meaning "No Acceleration", and 0x1 meaning "All but cursor acceleration" (see "Extended Display Settings").
(4) Set the desired acceleration level, or delete the entry to set "Full" acceleration mode.
(5) Let Windows reload the display settings by using the following code:

  DEVMODE devMode;
  BOOL success = ::EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devMode);
  if (success == TRUE)
  {
     LONG result = ::ChangeDisplaySettings(&devMode, CDS_RESET);
     printf("ChangeDisplaySettings() returned: %d\n", result);
  }

  First, the current display settings are loaded into the devMode variable, and then, the displayed is forced to perform a reset; at this occasion, the "Acceleration.Level" value is read out from the registry and the new acceleration level is set.

Enjoy, have fun, or do whatever you want to... :-)
0
 
LVL 6

Accepted Solution

by:
Mindphaser earned 0 total points
ID: 8240525
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question