Link to home
Start Free TrialLog in
Avatar of Crackman
Crackman

asked on

how to get VideoCard information using DeviceIoControl

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);
Avatar of George Tokas
George Tokas
Flag of Greece image

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.
Avatar of Crackman
Crackman

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of George Tokas
George Tokas
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
registry sucks
i'll use dirextx. i wasn't sure about it but now i think it will work fine.
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