🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.pascal.borland
3 messages
3 total messages Started by sp33m Tue, 16 Jul 2002 03:19
detecting windows version from TP7?
#124
Author: sp33m
Date: Tue, 16 Jul 2002 03:19
14 lines
1735 bytes
is it possible to detect which version of windows is running when launching
an turbo pascal 7 application?

i wrote a turbo 7 application years ago that still sees a lot of use.
however, it croaks when it tries to initialize the sound -- apparently
windows NT/XP hates the SMIX sound library.  i'd like to make the
application still useable under NT/XP (it works fine under 31/9x/ME), i
figured a quick hack would be to disable the sound under these noncompatible
OS'.

on a similar note, does anyone know a sound library for good old TP7 that
works under NT/XP?

any assistance greatly appreciated.
Re: detecting windows version from TP7?
#125
Author: Ralf A. Quint
Date: Wed, 17 Jul 2002 02:00
15 lines
2353 bytes
On Mon, 15 Jul 2002 21:19:39 -0600, "sp33m" <poo@toilet.com> wrote:

>is it possible to detect which version of windows is running when launching
>an turbo pascal 7 application?
>
>i wrote a turbo 7 application years ago that still sees a lot of use.
>however, it croaks when it tries to initialize the sound -- apparently
>windows NT/XP hates the SMIX sound library.  i'd like to make the
>application still useable under NT/XP (it works fine under 31/9x/ME), i
>figured a quick hack would be to disable the sound under these noncompatible
>OS'.
Check for the "real" DOS version of 5.50, which will indicate that a
NT based Windows (NT 3.51, NT 4.0, W2K or XP) is running....

Ralf
Re: detecting windows version from TP7?
#123
Author: Frederic Pasteleurs
Date: Mon, 22 Jul 2002 16:47
25 lines
2061 bytes

Ralf A. Quint wrote:
> 
> Check for the "real" DOS version of 5.50, which will indicate that a
> NT based Windows (NT 3.51, NT 4.0, W2K or XP) is running....
> 

All flavours of Windows NT set up a lot of environment variables. I 
don't remember which variable to use, but if you type SET in a DOS 
window, you list all the env vars that are set in your system.

The variable "WINDIR=" is set by the 3.1/9x branch.

Pick a variable named "STEPPING=" or something like that (indicates the 
CPU stepping and is maintained by the kernel), read this variable using 
the GETENV() function and see if it contain something. If the string is 
not empty, you know that you run a NT flavour of Windows.

Fred.

-- 
Remove OBVIOUS from e-mail before reply

Attached WORD documents are sent to /dev/null :-)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads