Results 1 to 1 of 1

Thread: [c#]Getting Memory Info from a AMD/ATI based GPU

  1. #1
    Join Date
    Jun 2000
    Thanked 993 Times in 330 Posts

    Default [c#]Getting Memory Info from a AMD/ATI based GPU

    first we need to get the ADL SDK it can be found here:Click

    since the Samples are very limited we need to add manual all the functions we need
    however all structs can be found inside include/adl_structures.h

    the memory struct can be found on line 110 .

    using the Sample-Managed.

    the import name is ( ADL.cs )

                internal static extern int ADL_Adapter_MemoryInfo_Get(int adapterIndex, ref ADLMemoryInfo lpMemoryInfo);
    the Function is

      #region ADL_Adapter_Memoryinfo_Get
            /// <summary> ADL_Adapter_MemoryInfo_Get Delegates</summary>
            internal static ADL_Adapter_MemoryInfo_GetDelegate ADL_Adapter_Memoryinfo_Get
                    if (!ADL_Adapter_Memoryinfo_Check && null == ADL_Adapter_Memoryinfo_GetDelegate_)
                        ADL_Adapter_Memoryinfo_Check = true;
                        if (ADLCheckLibrary.IsFunctionValid("ADL_Adapter_MemoryInfo_Get"))
                            ADL_Adapter_Memoryinfo_GetDelegate_ = ADLImport.ADL_Adapter_MemoryInfo_Get;
                    return ADL_Adapter_Memoryinfo_GetDelegate_;
            /// <summary> Private Delegate</summary>
            private static ADL_Adapter_MemoryInfo_GetDelegate ADL_Adapter_Memoryinfo_GetDelegate_ = null;
            /// <summary> check flag to indicate the delegate has been checked</summary>
            private static bool ADL_Adapter_Memoryinfo_Check = false;
            #endregion ADL_Adapter_Memoryinfo_Get
    now go inside Programm.cs

     for (int i = 0; i < NumberOfAdapters; i++)

    ADLMemoryInfo ADL_Memory = new ADLMemoryInfo();
    if (null != ADL.ADL_Adapter_Memoryinfo_Get)
                                            ADL.ADL_Adapter_Memoryinfo_Get(OSAdapterInfoData.ADLAdapterInfo[i].AdapterIndex, ref ADL_Memory);
                                            double MemorySize = Convert.ToDouble(ADL_Memory.iMemorySize.ToString());
                                            MemorySize /= 1048576;//Mebibyte (MiB)     220 Byte = 1.048.576 Byte ( taken from wiki )
                                            Console.WriteLine("Memory Size    : " + MemorySize.ToString() + " MB");

    the same way can be done will all other structures
    i don't take any credits for that i only have read *What is ADL and how to use it.doc* and found it out
    already added temps/clocks etc.

    you really should try it out its very interesting
    Attached Images Attached Images
    Site: 76561198053491311

  2. The Following 5 Users Say Thank You to King-OrgY For This Useful Post:

    lolzoruslockus (13th August 2011), metalHead189 (18th August 2011), Resurrected (17th March 2013), Troll (8th May 2012), xxdecoy (1st August 2012)

Visitors found this page by searching for:

adl sdk c#

c# ati adl adladapterinfo

c# ati adl

get graphic card memory size c#

amd adl free memory

adl sample gpu

amd adl get gpu memory

get ram name on c#

c# select form gpu

get gpu name in c#

get memory info of ATI

get gpu name c#

c# ati detect memory

adl free memory

SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts