Type OSVERSIONINFO
dwOSVersionInfoSize As integer
dwMajorVersion As integer
dwMinorVersion As integer
dwBuildNumber As integer
dwPlatformId As integer
szCSDVersion As String * 128
End Type
Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As integerDim OSInfo as OSVersionInfo
Dim nRet As Integer
'Set the structure size
OSInfo.dwOSVersionInfoSize = 148 'Len(OSInfo)
'Get the Windows version
iRet = GetVersionEx(OSInfo)I have successfully implemented this solution.
Based on that I have created .NET assembly (*.dll).
After that all you need is to declare the method in your MapBasic application:
Declare Method OSName
Class "nmiDotNet.MBOSinfo"
Lib "nmiDotNet.dll" () As String
And you can call this method like simple function in MapBasic: OSName()
I customized output string to get names like this:
Windows 10 Professional Bit64
Windows 8 Professional Bit64
Windows 7 Enterprise Bit64 (Service Pack 1)
Windows 7 Enterprise Bit32 (Service Pack 1)
Windows XP Professional Bit32 (Service Pack 3)
Thanks guys.
This time I kept quiet for a good reason:
I had no answer at all J
Enjoy your weekends!
Peter Horsbøll Møller
Pitney Bowes
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.