Board index » delphi » detecting windows version from TP7?

detecting windows version from TP7?

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?


sp33m schrieb:

Quote
> 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.

This is indeed possible. Get Ralf Browns Intlist and look up the Int
2Fhex there is some API to get what you want.

Alternatively search for such code on these places:

www.gdsoft.com (Download SWAG, there are some old but still usefull [if
                 you extend them] routines for this)

www.google.com use this keywords: detect windows pascal the first result
                                   will give you some code as well
                                   (quality not tested)

Greetings

Markus

Re:detecting windows version from TP7?


Quote
On Mon, 15 Jul 2002 21:19:39 -0600, "sp33m" <p...@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?


Quote
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 :-)

Other Threads