Solved

Retrieving Hardware Info on 95 & NT

Posted on 1998-07-24
11
257 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
  • 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
 
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now