hello, I am taking an OS course and we had a hometask to describe in details the location and contents of all device list in RAM. Can anyone help m solve this.I've made a google search but I didn't find any thing.

Recommended Answers

All 5 Replies

This will get you started, but you'll probably need to narrow it down to device type.

using System;
using System.Management; //ALSO add this as a DLL reference
//
namespace DW_404430
{
   class Program
   {
      static void Main(string[] args)
      {
         string strScope = @"\\.\root\cimv2";
         string strQuery = "Select * FROM Win32_SystemDevices";
         using (ManagementObjectSearcher mos = new ManagementObjectSearcher(strScope, strQuery))
         {
            foreach (ManagementBaseObject mbo in mos.Get())
            {  //ManagementObjectCollection
               //Console.WriteLine(mbo.GetPropertyValue("GroupComponent").ToString());
               Console.WriteLine(mbo.GetPropertyValue("PartComponent").ToString());
            }
         }
      }
   }
}

thank u this is really helpfull but indeed i want some information about the location of these devices in RAM in general in any computer system without using a program if u can support me with some info i will appreciate that :)

Well, that really depends on what you mean "in RAM".
Do you want to know:
1) the specific memory location where device IDs are stored?
2) something else?

Also, when you say "without using a program", does that also mean without using:
1) Device Manager (Control Panel ->System -> Hardware - Device Manager)?
2) Debug?
3) Something you write?

And when you say "any computer system", do you mean
1) Any MS Windows computer system?
2) All operating systems and processors?

Well, that really depends on what you mean "in RAM".
Do you want to know:
1) the specific memory location where device IDs are stored?
2) something else?

Also, when you say "without using a program", does that also mean without using:
1) Device Manager (Control Panel ->System -> Hardware - Device Manager)?
2) Debug?
3) Something you write?

And when you say "any computer system", do you mean
1) Any MS Windows computer system?
2) All operating systems and processors?

hello, regarding "in RAM" I want the memory location where device IDs are stored and any other info. Also,regarding "without using a program" I want something I write on paper inorder to discuss in class room , and I want it to be regarding any MS windows.
Best Regards!

Guys I am really in need for these information as quick as possible if any body have any idea please help!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.