Posted: 6th Feb 2003 11:58
Hi @ all ... here's a nice little "Get current Windows version" code which shows you that there's no extra DLL needed

+ Code Snippet
` Get Windows Version Code (c) by Hubdule @ Color Arts 2003
` http://www.colorarts.de 
` Init DBPro
Sync On
Sync Rate 0

` ############################################################# Start
` Get Windows Version Function
` First create a memblock with the size of 148 bytes
MAKE MEMBLOCK 1,148
` Get the memblock Pointer
MemPTR=GET MEMBLOCK PTR(1)
` And write the size of the block at the first position
WRITE MEMBLOCK DWORD 1,0,148
` Load Kernel32 and call GetVersionExA and point it's output to the
` memblock pointer :)
LOAD DLL "Kernel32",1
   CALL DLL 1,"GetVersionExA",MemPTR
DELETE DLL 1
` Now read the memblock values ...
OSVersionInfoSize=MEMBLOCK DWORD(1,0)
OSMajorVersion=MEMBLOCK DWORD(1,4)
OSMinorVersion=MEMBLOCK DWORD(1,8)
OSBuildNumber=MEMBLOCK DWORD(1,12)
OSPlatformID=MEMBLOCK DWORD(1,16)
OSCSDVersion$=""
for i=0 to 127
   OSCSDVersion$=OSCSDVersion$+chr$(MEMBLOCK BYTE(1,20+i))
next i
DELETE MEMBLOCK 1
` ############################################################# End

` And print out all values needed :D
Set Cursor 0,0
Print "OS Version Info size: "+str$(OSVersionInfoSize)
Print "OS Major Version: "+str$(OSMajorVersion)
Print "OS Minor Version: "+str$(OSMinorVersion)
Print "OS Build Number: "+str$(OSBuildNumber)
Print "OS Platform ID: "+str$(OSPlatformID)
Print "OS CSDVersion String: "+OSCSDVersion$

Select OSPlatformID
   ` Windows 9x/Me Versions
   case 1
      If OSMinorVersion=0 then Print "You use Windows 95"
      If OSMinorVersion=10 then Print "You use Windows 98"
      If OSMinorVersion>10 then Print "You use Windows ME"
   endcase

   ` Windows NT/2000/XP Versions
   case 2
      IF OSMajorVersion=3 then Print "You use Windows NT 3.x"
      IF OSMajorVersion=4 then Print "You use Windows NT 4.x"
      IF OSMajorVersion=5 and OSMinorVersion=0 then Print "You use Windows 2000"
      IF OSMajorVersion=5 and OSMinorVersion=1 then Print "You use Windows XP"
      IF OSMajorVersion=5 and OSMinorVersion>1 then Print "You use an unknown Windows version"
      IF len(OSCSDVersion$)>0 then print "This OS Version has "+OSCSDVersion$+" installed"
   endcase
endselect
` Sync the current view
Sync
` Wait until key is pressed
Suspend for key
end
Posted: 6th Feb 2003 12:46
Here's a ready made Function which returns a preformated string telling what OS Version you currently use

+ Code Snippet
` Get Windows Version Code (c) by Hubdule @ Color Arts 2003
` http://www.colorarts.de 
` Init DBPro
Sync On
Sync Rate 0
Print GetOSVersion$()
` Sync the current view
Sync
` Wait until key is pressed
Suspend for key
end

Function GetOSVersion$()
` ############################################################# Start
` Get Windows Version Function
` First create a memblock with the size of 148 bytes
MAKE MEMBLOCK 1,148
` Get the memblock Pointer
MemPTR=GET MEMBLOCK PTR(1)
` And write the size of the block at the first position
WRITE MEMBLOCK DWORD 1,0,148
` Load Kernel32 and call GetVersionExA and point it's output to the
` memblock pointer :)
LOAD DLL "Kernel32",1
   CALL DLL 1,"GetVersionExA",MemPTR
DELETE DLL 1
` Now read the memblock values ...
OSVersionInfoSize=MEMBLOCK DWORD(1,0)
OSMajorVersion=MEMBLOCK DWORD(1,4)
OSMinorVersion=MEMBLOCK DWORD(1,8)
OSBuildNumber=MEMBLOCK DWORD(1,12)
OSPlatformID=MEMBLOCK DWORD(1,16)
OSCSDVersion$=""
for i=0 to 127
   OSCSDVersion$=OSCSDVersion$+chr$(MEMBLOCK BYTE(1,20+i))
next i
DELETE MEMBLOCK 1
` ############################################################# End
Select OSPlatformID
   ` Windows 9x/Me Versions
   case 1
      If OSMinorVersion=0 then Result$="Windows 95"
      If OSMinorVersion=10 then Result$="Windows 98"
      If OSMinorVersion>10 then Result$="Windows ME"
   endcase
   ` Windows NT/2000/XP Versions
   case 2
      IF OSMajorVersion=3 then Result$="Windows NT 3.x"
      IF OSMajorVersion=4 then Result$="Windows NT 4.x"
      IF OSMajorVersion=5 and OSMinorVersion=0 then Result$="Windows 2000"
      IF OSMajorVersion=5 and OSMinorVersion=1 then Result$="Windows XP"
      IF OSMajorVersion=5 and OSMinorVersion>1 then Result$="Unknown Windows version"
      IF len(OSCSDVersion$)>0 then Result$=Result$+" with "+OSCSDVersion$+" installed"
   endcase
endselect
Result$=Result$+", (Build: "+str$(OSBuildNumber)+")"
EndFunction Result$
Posted: 6th Feb 2003 13:49
aww now people won't use my DLL
hehee this is cool work thou ... god i wish i knew windows DLLs better.
Posted: 6th Feb 2003 14:32
Still not as detailed as my plug-in you know...
Posted: 6th Feb 2003 14:41
? Don't understand that because your plugin I've tested ( 2 dlls from your hp) creates somewhat similar ?
Posted: 6th Feb 2003 14:52
Mine lists version pack installed... When I get home, I'll put up an example.