Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3342314
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:49:26+00:00 2026-05-18T00:49:26+00:00

I have a .net/DirectX-based rendering library. At program start, we try to find out

  • 0

I have a .net/DirectX-based rendering library. At program start, we try to find out the amount of physical video RAM. Detecting the amount of physical video memory is important, to know how much can be used for textures (If you’ve done serious directX you probably already know).

Video RAM is detected by executing the following WMI code:

var searcher = new ManagementObjectSearcher("Select * from Win32_VideoController");

foreach(ManagementObject videoCard in searcher.Get())
{
    _numVideoCards++;
    foreach (PropertyData propertyData in videoCard.Properties)
    {
        if (propertyData.Name == "AdapterRAM" && propertyData.Value != null)
        {
            _adapterRAM = Math.Max( (UInt32)(propertyData.Value), _adapterRAM );
        }
    }
}

This code was written years ago by people who knew directX better than me.

The issue is that this call is now failing unpredictably on customer hardware (_adapterRAM == 0 after the code completes, and an exception is logged).

I would like to change the test, but I hesitate because I expect there is a reason why the video memory is detected this way, and directly through DirectX.

My question is twofold:

  • Does anyone know why you’d do this with WMI, and/or
  • do you know a more reiliable way to detect the amount of physical video RAM?

P.S.: We’re not interested in shared memory video cards (e.g. Intel). We use SlimDX if that makes a difference.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:49:27+00:00Added an answer on May 18, 2026 at 12:49 am

    Simply because D3D9 doesn’t expose the amount of physical memory on the device. WMI is the only vendor independent option as far as I know.

    With D3D10 and D3D11 (making use of DXGI) you retrieve it using field DedicatedVideoMemory of struct DXGI_ADAPTER_DESC and voilà.
    So if you are targeting Vista or Seven OS, this should work.

    An option (but not nice) would be to use OpenGL and proprietary extensions like GL_ATI_meminfo or using proprietary IHV api like NVAPI and making a thin wrapper around them with C++/CLI.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Flex 4 application which connects to ASP.NET webservice based on FluorineFx
I have the authentication portion of an ASP.NET 3.5 web application complete. I would
We're using a FileStreamResult to provide video data to a Silverlight MediaElement based video
I have an ASP.NET app running on a webserver. A third party is created
After debugging a particularly tricky issue in VB.NET involving the order in which instance
I have a web app where user is required to authenticate to view certain
Does anybody know of a managed programming language implemented on .NET that contains a
I've been looking around for this for quite some time and cannot seem to
Back in the day it was easy; You made your own 3D stuff, then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.