delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/12/30/18:41:38

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200012302341.AAA15758@father.ludd.luth.se>
Subject: DOZE and WINDOZE versions
To: djgpp-workers AT delorie DOT com (DJGPP-WORKERS)
Date: Sun, 31 Dec 2000 00:41:31 +0100 (MET)
X-Mailer: ELM [version 2.4ME+ PL54 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

FYI, I've checked what versions are reported on some platforms:

Where "ver" reports "Windows 95. [Version 4.00.1111]"
_get_dos_version() reports 7.10.

Where "ver" reports "Windows 98 [Version 4.10.1998]"
_get_dos_version() reports 7.10.

Where "ver" reports "Windows Millennium [Version 4.90.3000]"
_get_dos_version() reports 8.0.

Flavour is always "MS-DOS".

Test program:
#include <stdio.h>
#include <dos.h>

extern const char *_os_flavor;

int main(void)
{
  unsigned short version;

  printf("Reported flavour: '%s'.\n", _os_flavor);

  version = _get_dos_version(0);
  printf("Reported version: %d . %d.\n", (version>>8) & 0xff, version & 0xff);

  version = _get_dos_version(1);
  printf("Real version: %d . %d.\n", (version>>8) & 0xff, version & 0xff);

  return( 0 );
}


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019