Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Detecting Capacity Of VRAM Installed

Hi all,
I want to detect the capacity of the video ram installed into the system. is there any win32 api which detects the system resources such as Video RAM, Processor, RAM, capacity of hard drive and so on.
Thanks and Regards,
Bidesh
[262 byte] By [bidesh] at [2007-11-11 10:06:59]
# 1 Re: Detecting Capacity Of VRAM Installed
Directx should have a query for this -- I know it allowed me to query the joystick model number and capabilities. But that is for the video card ram, for the system ram used as video ram on cheap cards, I do not know if it would work.
jonnin at 2007-11-11 20:59:28 >
# 2 Re: Detecting Capacity Of VRAM Installed
Check out this link:

MSDN System Information ( http://msdn2.microsoft.com/en-us/library/ms724951.aspx)
dcwexter at 2007-11-11 21:00:28 >
# 3 Re: Detecting Capacity Of VRAM Installed
I found this on the web I'm not sure if it works.

IDirectDraw* dd = 0;
HRESULT hr = DirectDrawCreate(0, &dd, 0);
if(SUCCEEDED(hr) && dd != 0)
{
DDCAPS caps;
memset(&caps, 0, sizeof(caps));
caps.dwSize = sizeof(caps);
hr = dd->GetCaps(&caps, 0);
if(SUCCEEDED(hr))
video_info.video_mem = caps.dwVidMemTotal;
dd->Release();
}
So this method requires directdraw be started
Ivan** at 2007-11-11 21:01:32 >