Mail Archives: djgpp-workers/2000/12/30/18:41:38
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 -