Following this post I had the need to detect which graphic card is really in use. In order to be sure to use the dedicated NVIDIA and not the integrated intel I:
- have set to use it for global usage
- have forced to use it for my application
So I am pretty sure that my program is using the NVIDIA also because I see the GPU usage in the task manager
That being said I need a way to confirm that I am using the NVIDIA and not the INTEL graphic card.
From that page I see a way to do it. And following my implementation:
string strGraphicCards = "Graphic cards: ";
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_VideoController");
foreach (ManagementObject mo in searcher.Get())
{
PropertyData currentBitsPerPixel = mo.Properties["CurrentBitsPerPixel"];
PropertyData description = mo.Properties["Description"];
if (currentBitsPerPixel != null && description != null)
{
if (mo["CurrentBitsPerPixel"] != null && mo["CurrentHorizontalResolution"] != null)
strGraphicCards += " **USED** " + description.Value + ", ";
else
strGraphicCards += description.Value + ", ";
}
}
Serializers.Loggers.WriteNLog(strGraphicCards, eLogLevel.Trace);
and quite unexpectedly the result is:
Thanks for any help in understanding where the conundrum is
Patrick