Solved

Retrieving Hardware Info on 95 & NT

Posted on 1998-07-24
11
273 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
Technology Partners: 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month3 days, 21 hours left to enroll

630 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