Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

Gather Low level system info

I need to gather some low-level info.  I am using Delphi2.  I need to gather DOS Version, BIOS Make and Date, Conventional memory available, CPU Clock Speed - sperling provided an answer for clock speed yesterday and I THOUGHT that it worked, but it doesn't seem to be working correctly on my 200 MHz (detecting it as 119.32 MHz).  Also, how do you detect hardware presence/absence (mouse, keyboard, etc.)?  I read the answer from alon and I am afraid that it looks like alot of info, but I am just too new at Delphi to understand what I am supposed to do with it.  Also, in my previous question I mentioned that I had looked at about 10 "system info" compnonents and none have CPU Clock Speed.  I tried DSP again per Alon's note.  I still do not see anything for Delphi 2.0 that will do this.  Is there a specific component that you KNOW will get this info?
0
Rik
Asked:
Rik
1 Solution
 
alona041797Commented:
Dos Version:

procedure dosver(var ver,rev:byte); assembler;
asm
  MOV AH,30h
  INT 21
  MOV ver,AH
  MOV rev,AL
end;

CPU Speed:
  Freeware component available at the DSP: http://sunsite.icm.edu.pl/delphi/

Equipment: (use int 11)
Interrupt 11h  Equipment Check

(0:0044h)       Reads the BIOS Data Area and returns two bytes of setup info.
entry   no parameters are required
return  AX      Equipment listing word. Bits are:
                0       number of floppy drives
                        0       no drives
                        1       bootable (IPL) diskette drive installed
                1       math chip
                        0       no math coprocessor (80x87) present
                        1       math coprocessor (80x87) present
         (PS/2) 2       0       mouse not installed
                        1       mouse installed
          (PC)  2,3     system board RAM
                        0,0     16k    (PC-0, PC-1)
                        0,1     32k
                        1,0     48k
                        1,1     64k    (PC-2, XT)
                        note 1) not commonly used. Set both bits to 1
                             2) both bits always 1 in AT
                4,5     initial video mode
                        0,0     no video installed (use with dumb terminal)
                        0,1     40x25 color      (CGA)
                        1,0     80x25 color      (CGA, EGA, PGA, MCGA, VGA)
                        1,1     80x25 monochrome (MDA or Hercules, most super-
                                                  hires mono systems)
                6,7     number of diskette drives (only if bit 0 is 1)
                        0,0     1 drives
                        0,1     2 drives
                        1,0     3 drives
                        1,1     4 drives
                8       0       DMA present
                        1       no DMA (PCjr, some Tandy 1000s, 1400LT)
                9,A,B   number of RS232 serial ports (0-3)
                        0,0,0   none
                        0,0,1   1
                        0,1,0   2
                        0,1,1   3
                        1,0,0   4
                C       0       no game I/O attached
                        1       game I/O attached (default for PCjr)
                D       serial accessory installation
                        0       no serial accessories installed
                        1       Convertible - internal modem installed
                                or PCjr - serial printer attached
                E,F     number of parallel printers
                        0,0     none
                        0,1     one   (LPT1, PRN)
                        1,0     two   (LPT2)
                        1,1     three (LPT3)
                        note    Models before PS/2 would allow a fourth
                                parallel printer. Remapping of the BIOS in the
                                PS/2s does not allow the use of LPT4.
        (386 extended AX)
                23d     0       Weitek ABACUS - virtual '86 EMS page tables
                                not correctly initialized
                        1       Weitek ABACUS - virtual '86 EMS page tables OK

                24d     0       Weitek ABACUS NDP not present
                        1       Weitek ABACUS NDP present



0
 
RikAuthor Commented:
Edited text of question
0
 
RikAuthor Commented:
I grade 'F' to this answer only because I do not know how to use this information. Perhaps, if I could get some example code like sperling provided on my previous question (even though that code is not working like I need it to).  Sorry to sound like an idiot, but I am new to Delphi.  Thanks, Rik
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
vorlonCommented:
Rik,
Below is a brief snipet of code that will get the windows version, dos version and conventional memory for you. I don't have the time to get the other stuff (cpu speed, hardware, etc. at this time. I'll try to get to it tonight. Sorry.) In the mean time, I figure you could use this. The information is placed into a memo control.

   memo1.lines.clear;

   version:=GetVersion;
   memo1.lines.add('Windows Version: '
        + inttostr(LOBYTE(LOWORD(version))) + '.'
        + inttostr(HIBYTE(LOWORD(version))));
   memo1.lines.add('MS-DOS Version: '
        + intostr(HIBYTE(HIWORD(version))) + '.'
        + inttostr(LOBYTE(HIWORD(version))));

   memo1.lines.add('Free Space: '
        +inttostr(GetFreeSpace(0) div 1024)+'kb');

Hope this helps.
0
 
RikAuthor Commented:
Vorlon,

Thanks for taking a "shot" at my question.  I pasted the above code into my project and here are the results:

Windows Version: 4.0
MS-DOS Version: 192.0
Free Space: 1024kb

Obviously this is not returning the correct values (Windows version seems to be correct but that's about it).

The On-Line documentation says that "GetVersion" returns a DWORD,  so that is what I declared version as.  It also says that "GetVersion" will NOT return the DOS version (is that incorrect).

Anyway, the have gotten answers ELSEWHERE for all of my questions except DOS Version, CPU Clock Speed (the most important to me).  

Got any other ideas?
0
 
vorlonCommented:
The code I posted for you was tested using vb3 on windows 3.1. After reading your comment I went home and verified that GetVersion has changed from win16 to win32. It no longer returns the dos version. I also checked GetVersionEX and it, too, does not return the dos version. I'll keep checking and let you know...

0
 
tfwongCommented:
Try to download the DrBob.DLL v2.50 from http://home.pi.net/~drbob/

You can find more information at: http://www.drbob42.com/tools/drbob.htm (this page is updated for version 2.01)

The experts there may NOT include all the information you asked for but I think you may find them useful.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now