Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to know if it Win95/98 or Win NT running
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00164270
Message ID:
00164276
Views:
24
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform