Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


WinMetrics and WinVersion Returning Incorrect Values

Keywords:	Winversion Winmetrics Netware NetInfo 3.10

Known Problems:

WinBatch not Reporting Correct Windows Version

Question:

The Winbatch WinVersion function is not returning the proper version of Windows (it should be 3.11 and NOT 3.10). Any Ideas?

Answer:

WinBatch is indeed reporting the numbers as provided by the Windows API calls. There is a long complicated reason for this involving Microsoft only licensing Novell NetWare drivers for Windows version 3.10, but nothing else, so Windows 3.11 appears internally as something like Version 3.10 SubVersion 1.

WinVersion function under NT 3.51:

The 32 bit version of WinBatch returns the correct Windows version under NT (i.e., 3.51).

However, the 16-bit version of WinBatch returns 3.10 under NT. The reason for this is that Windows NT is "emulating" Windows 3.1 for 16-bit applications.

If you're trying to determine is a platform is either 16 or 32 bit, then use the WinMetrics function, with the -4 request code. There are nice examples elsewhere on this website on how to use WinMetrics to determine the platform, and thereafter launch the appropriate compiled EXE depending on that result.


Article ID:   W12725
Filename:   WinMetrics Incorrect Return and Winversion Tips.txt