Date: Wed, 24 Dec 1997 10:25:14 +0200 (IST) From: Eli Zaretskii To: Robert Hoehne cc: djgpp AT delorie DOT com Subject: Re: Determining Operating System In-Reply-To: <349FDF40.11D42A2B@gmx.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Tue, 23 Dec 1997, Robert Hoehne wrote: > void > _init_win_check() > { > win_version = _get_win_version(); > _get_dos_version(1); > nt_detected = (win_version == 0) && (_osmajor == 0x05) && (_osminor == > 0x32) > w95_detected = win_version >= 0x0400; > } Did this ever work on NT? I think it won't, because `_get_dos_version' doesn't set `_osmajor' and `_osminor' to the true version it computes when called with a non-zero argument (this is specifically explained in the docs), it only returns that version number to the caller. So the test for NT should be rewritten like so: nt_detected = _get_dos_version(1) == 0x0532;