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);
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);
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
registry sucks
i'll use dirextx. i wasn't sure about it but now i think it will work fine.
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
Anyway there is a way to find those without using the registry using the VGA registers but it is not that easy...
Regards,
gtokas
Registry have all the info you want about display modes chipset and model.
The memory ammound can be retrieved through DirectX functions.
gtokas.