Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

To know Dos Subsystem version

Posted on 1999-06-28
3
Medium Priority
?
133 Views
Last Modified: 2010-04-06
Hello,

I want to get dos subsystem version, how to do that. Thank you very much for your help.

Regards,

Bob
0
Comment
Question by:MamaBob
[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
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
simonet earned 40 total points
ID: 1385101
Technical Information Database
TI974D.txt   How to get the windows and DOS versions.Category   :Windows API
Platform    :AllProduct    :Delphi  1.0Description:
Q:  How can I get the Windows or DOS version numbers?
A:  The API call GetVersion will do it, but the information is
encrypted into a longint.  Here is how to get and decrypt the information:  Type
    TGetVer = record      WinVer,      WinRev,      DosRev,      DosVer: Byte;
    end;  const    VerStr = '%d.%d';
  procedure TForm1.Button1Click(Sender: TObject);  var    AllVersions: TGetVer;
  begin    AllVersions := TGetVer(GetVersion);
    Edit1.Text := Format(VerStr, [AllVersions.WinVer, AllVersions.WinRev]);
    Edit2.Text := Format(VerStr, [AllVersions.DOSVer, AllVersions.DOSRev]);
  end;Note1:  The values that windows displays for the versions and the values
that it returns through its API call are not always the same.  e.g.  The
workgroup version displays as 3.10 rather than 3.11.
Note2: Win32 applications should call GetVersionEx rather than GetVersion.
0
 
LVL 15

Expert Comment

by:simonet
ID: 1385102
Ops.. that text came out awful. HEre's a better version of the same text:

Technical Information Database

TI974D.txt   How to get the windows and DOS versions.
Category   :Windows API
Platform    :All
Product    :Delphi  1.0

Description:
Q:  How can I get the Windows or DOS version numbers?

A:  The API call GetVersion will do it, but the information is encrypted into a longint.  Here is how to get and decrypt the information:

  Type
    TGetVer = record
      WinVer,
      WinRev,
      DosRev,
      DosVer: Byte;
    end;

  const
    VerStr = '%d.%d';

  procedure TForm1.Button1Click(Sender: TObject);
  var
    AllVersions: TGetVer;
  begin
    AllVersions := TGetVer(GetVersion);
    Edit1.Text := Format(VerStr, [AllVersions.WinVer, AllVersions.WinRev]);
    Edit2.Text := Format(VerStr, [AllVersions.DOSVer, AllVersions.DOSRev]);
  end;

Note1:  The values that windows displays for the versions and the values that it returns through its API call are not always the same.  e.g.  The workgroup version displays as 3.10 rather than 3.11.

Note2: Win32 applications should call GetVersionEx rather than GetVersion.

0
 

Author Comment

by:MamaBob
ID: 1385103
Hello Simonet,

Big Thanks

Bob
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

705 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