Solved

Retrieving Hardware Info on 95 & NT

Posted on 1998-07-24
11
270 Views
Last Modified: 2010-08-05
Has anybody got a reference with description of (API-) functions/procedures 2 retrieve hardware info on Windows95 & WindowsNT?
Purpose: Getting all information (that is, as much as possible) that is shown in the device manager. Of main interest however r infos on disks (no., capacity, media type, ser.no), RAM (if possible, type and access rates), cards (network node, graphics board, ISDN, Sound etc.) and monitor.
       
---> THIS ALL WITHOUT ANY BIOS CALL!! <---

If this all were only on 95, there wouldn't b any problem.
But it has 2 run on NT, 2.
If u have got anything, I'd b thankful 4 each & every bit.

Best & most complete suggestion will receive A-rating times 50 points. Plus 10 (x rate A) 4 being quick.

(I hate this API crap)

Black Death.

Ach:
As u may have noticed, API function calls on system information r my subject the last few dayz (alas!).
When I'm dun with this, I'll wrap it all in a couple of units & post'em 'ere 4 Zero so anybody who's interested could grab'em. & provide suggestions on improvements.
So we all will benefit from it. Whaddaya think?
0
Comment
Question by:BlackDeath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
  • +2
11 Comments
 
LVL 1

Author Comment

by:BlackDeath
ID: 1358640
uhm - is anybody out there interested in gathering 1 or the other point at all?

however.

enjoy the weekend, freex.

Black Death.
0
 
LVL 1

Expert Comment

by:AJFleming
ID: 1358641
There's a shedload of hardware information in the registry under

   HKEY_LOCAL_MACHINE\Enum

Some of it's pretty obscure but there's some interesting stuff there.

You can get some drive information (size, serial number, cluster size etc) using API calls, but I can't find the relevent calls right now. I'll have a look around and post them when I find
them.

Good luck,

Adam...
0
 
LVL 1

Author Comment

by:BlackDeath
ID: 1358642
thanx, adam.

i'm quite well familiar with the registry - analyzed those keys already.

result:
a) unwieldy
b) the types of some keys differ in 95 & NT (1 shouldn't believe!)
b) i wanna use clean routines
c) can't imagine microsoft browsing the registry when building the device managers' info - they must have an interface

so what u told me ain't the solution. but as u told me, you're on the hunt. thanx, man. i won't abandon hope as long as this board exists.

Black Death
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Accepted Solution

by:
omsec earned 50 total points
ID: 1358643
i can send a complete demo-program to you by email
0
 
LVL 1

Expert Comment

by:AJFleming
ID: 1358644
Found it!

procedure TForm1.Button1Click(Sender: TObject);
 var
   VolumeName,
   FileSystemName     : array [0..MAX_PATH-1] of Char;
   VolumeSerialNo     : DWord;
   MaxComponentLength,
   FileSystemFlags    : Integer;
 begin
      GetVolumeInformation('C:\',VolumeName,MAX_PATH,@VolumeSerialNo,
                        MaxComponentLength,FileSystemFlags,
                        FileSystemName,MAX_PATH);
   Memo1.Lines.Add('VName = '+VolumeName);
   Memo1.Lines.Add('SerialNo = $'+IntToHex(VolumeSerialNo,8));
   Memo1.Lines.Add('CompLen = '+IntToStr(MaxComponentLength));
   Memo1.Lines.Add('Flags = $'+IntToHex(FileSystemFlags,4));
   Memo1.Lines.Add('FSName = '+FileSystemName);
 end;

Now all I need to is figure out a way to stop ExEx mashing code listings.

Hope this helps,

Adam...
0
 
LVL 4

Expert Comment

by:jeurk
ID: 1358645
May I get a copy of you demo prgram too omsec ?
Please.
Knipjo@citeweb.net
0
 
LVL 1

Author Comment

by:BlackDeath
ID: 1358646
Hi, Adam.

Thanxsofar.
Doesn't quite cover the requested range of information but it's helping. If u find something else 4 drive or CPU, i'll b grateful 2 u 4 posting it.

Again-thanx. & bye,

Black Death.
0
 
LVL 1

Author Comment

by:BlackDeath
ID: 1358647
Hey, omsec!

Thanx 4 answer.
Does this demo cover CPU & drive information as described in my question? Is complete source code included? No new components?
NT & 95?
Anyway - I trust u.
So send it please.
My mail address is 2 b obtained in information on Black Death.

Rating A as promised not knowing what's awaiting me.
I'll let u know, if this is what I was looking 4 (& if it really was excellent...)

2 all:

My system info library is growing, the point of 1st release coming nearer...

ha cgopobe (ain't got no cyrillic charset, sorry)

Black Death.




0
 
LVL 2

Expert Comment

by:omsec
ID: 1358648
the program i mean is from a Delphi 3 Book CD-ROM and shows how to get detailed information. It also includes a BP7 Sub-Program, becuz you can't get some informatin while runnin in protected mode. it is german, but i think you will get it, if there should be any problems with translation feel free to email me :)
0
 
LVL 1

Author Comment

by:BlackDeath
ID: 1358649
omsec:

BP7 Sub-Program means that most probably BIOS-Routines r used. As u can c in my initial question, I have no use 4 those, coz the program's gotta run on NT, 2. & as we all know, NT wlaks round the BIOS so u can't use BIOS calls.

so what.

Send it anyway. I'll try 2 figure out what might b of use & go on searchin 4 the missin parts/parts 2 substitute.

Concerning "getting it" when it's in german:
If u take a look at "to all ... new one?" in the Delphi Programming topic area u'll c that this shouldn't b the problem.

Awaiting your mail...
Und: thanx again

- I realize once more that I feel quite comfortable in this world of like-minded souls - have a nice day 2 everybody!

Black Death
0
 

Expert Comment

by:mroebuck
ID: 2871416
Please do not post comments or answers direct by email.

This does not give other people a chance to benefit from the answer!!!!!
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question