Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Jul 2015, 00:48
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Determining host operating system using VB 6
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message

Joined: 09 Jun 2010
Posts: 1

PostPosted: Wed 09 Jun 2010, 05:09    Post_subject:  Determining host operating system using VB 6  

Hi all,
I am sharing this topic with you.Hope u all find this very interesting.
Any suggestions are appreciated.

The first step is to make some simple declarations. Add the following code to your projects declarations.

Private Const VER_PLATFORM_WIN32s = 0
Private Const VER_PLATFORM_WIN32_NT As Long = 2

Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As Any) As Long

OSVSize As Long
dwVerMajor As Long
dwVerMinor As Long
dwBuildNumber As Long
PlatformID As Long
szCSDVersion As String * 128
End Type

After we are done with the above declaration we can have some methods/functions to determine current OS as shown below.

# 1.
Public Function IdentifyOperatingSystem() As String
Dim sOperatingSystem As String
sOperatingSystem = "NONE"
rOsVersionInfo.OSVSize = Len(rOsVersionInfo)
If GetVersionEx(rOsVersionInfo) Then
Select Case rOsVersionInfo.PlatformID

Back to top
View user's profile Send_private_message 
Sit Heel Speak

Joined: 30 Mar 2006
Posts: 2595
Location: downwind

PostPosted: Wed 09 Jun 2010, 09:46    Post_subject:  

This seems interesting but I do not really know what I'm looking at.

I do not know Windows VB6 at all, so no doubt the questions below show my ignorance, but...

Is it the purpose of this program, to return the exact identity of the Windows OS under which, say, QEMU, is being run?

If yes, does it return the identity to Windows, or can it be adapted to return the information to Linux?

If I am on the right track...is there a way to identify exactly which Windows is being run, in the case where it is something newer than NT, i.e. does this code snippet return

Windows Seven

or, better, information which is even more detailed, i.e. includes the subversion (e.g. "Windows Seven 64-bit Ultimate," Windows XP 32-bit Media Edition 2005", and the like)?
Back to top
View user's profile Send_private_message 

Joined: 11 Aug 2009
Posts: 1938
Location: Israel, somewhere in the beautiful desert

PostPosted: Wed 09 Jun 2010, 13:24    Post_subject:  

It's called uname. And yes, you can get uname for Windows.
My homepage
My GitHub profile
Back to top
View user's profile Send_private_message Visit_website MSNM 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0450s ][ Queries: 12 (0.0062s) ][ GZIP on ]