Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to know if it Win95/98 or Win NT running
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00164270
Message ID:
00164276
Vues:
31
>I need to register or update a OCX from my application. But the location of the OCX depend on the platform it install ( Win95/98 or Win NT).
>
>How can I know if it Win NT that is running or Win95/98 from my VFP applicaiton?

If you are trying to guess what the system directory is by the Operation System I wouldn't assume people install all the NT's in WINNT and all the win95 in windows. If you want the system directory there is an api call called GetSystemDirectory.

DECLARE INTEGER GetSystemDirectory STRING lctstr, INTEGER cchsyspath

lc_sysdir = SPACE(254)+CHR(0)
ln_szsysdir = 0
ln_szsysdir = GetSystemDirectory(@lc_sysdir, LEN(lc_sysdir))
lc_sysdir = LEFT(lc_sysdir, ln_szsysdir)

this way lc_sysdir holds the path to the system directory.
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform