Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how to get VideoCard information using DeviceIoControl

Posted on 2003-11-08
5
Medium Priority
?
976 Views
Last Modified: 2007-12-19
how can i get videocard information (Model, Chipset, VideoMemory ammount, supported display modes) using DeviceIoControl();

here is some code that i have. i think it's wrong. what should i do?

sprintf(DeviceName, "\\\\.\\DISPLAY1");
hDevice = CreateFile(DeviceName, GENERIC_READ,
                               FILE_SHARE_READ,
                            NULL, OPEN_EXISTING,
                               FILE_ATTRIBUTE_NORMAL, NULL);
if(hDevice != NULL)
{
   DeviceIoControl(hDevice, 0,
                          &InBuffer, InBufferSize,
                          &OutBuffer, OutBufferSize,
                          &BytesReturned, NULL);
   .....
}
CloseHandle(hDevice);
0
Comment
Question by:Crackman
[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
5 Comments
 
LVL 16

Expert Comment

by:George Tokas
ID: 9714969
Supposed that you are using windows and all are setted up correctly you can get those info AND from registry and from DirectX.
Registry have all the info you want about display modes chipset and model.
The memory ammound can be retrieved through DirectX functions.

gtokas.
0
 

Author Comment

by:Crackman
ID: 9716295
i know about directX functions of getting memory ammount, but i wanted to do it without directX.
BTW Is there any way to get AGP info from registry.
Actully i need as much information as i can get without DirectX.
Can you explain where exactly in registry this information is.
0
 
LVL 16

Accepted Solution

by:
George Tokas earned 450 total points
ID: 9716737
As I saw in one of my machines (winME) the info is at PCI at registry.
the info you need is at HKEY_LOCAL_MACHINE\System\currentcontrolset\services\class\DISPLAY
As 4 DirectX anyway it is installed on windows machines with version >3 so without any problem you can use those functions.

gtokas.
0
 

Author Comment

by:Crackman
ID: 9725170
registry sucks
i'll use dirextx. i wasn't sure about it but now i think it will work fine.
0
 
LVL 16

Expert Comment

by:George Tokas
ID: 9730505
It will but you will not get info about chipset and model...
Anyway there is a way to find those without using the registry using the VGA registers but it is not that easy...

Regards,
gtokas
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

636 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