Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Operating System version
Message
From
05/07/2002 12:31:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/07/2002 11:33:45
Irv Adams
MSC Managed Care, Inc.
Florida, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00675650
Message ID:
00675686
Views:
8
>Is there a way to determine OS within VFP 6.0? I tried OS(),and I'm running WIN98 and it only returns 'Windows 4.10'...what will it return for WIN95?
>
>TIA,

Windows 95 - Windows 4.0
Windows 98 - Windows 4.10
Windows Me - Windows 4.90
#DEFINE VER_PLATFORM_WIN32S         0
#DEFINE VER_PLATFORM_WIN32_WINDOWS  1
#DEFINE VER_PLATFORM_WIN32_NT       2

DECLARE RtlMoveMemory IN WIN32API ;
	INTEGER @DestNumeric, ;
	STRING @pVoidSource, ;
	INTEGER nLength

declare short GetVersionEx in win32API ;
  string @ lpVersionInfo 
lpVersionInfo = chr(128+5*4)+replicate(chr(0),128+5*4-1)

? GetVersionEx(@lpVersionInfo)

? 'Major version :',  DWord2Str(lpVersionInfo, 5)
? 'Minor version :',  DWord2Str(lpVersionInfo, 9)
? 'Build number  :',  DWord2Str(lpVersionInfo, 13)
? 'Platform id   :',  DWord2Str(lpVersionInfo, 17)
  

function DWord2Str
lparameters tcStr, tnOffsett
local lnValue
lnValue=0
RtlMoveMemory(@lnValue, substr(tcStr,tnOffsett,4), 4)
return lnValue
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform