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 Tue 16 Sep 2014, 21:38
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 [3 Posts]  
Author Message
elizas

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_WINDOWS = 1
Private Const VER_PLATFORM_WIN32_NT As Long = 2

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

Private Type OSVERSIONINFO
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 rOsVersionInfo As OSVERSIONINFO
Dim sOperatingSystem As String
sOperatingSystem = "NONE"
rOsVersionInfo.OSVSize = Len(rOsVersionInfo)
If GetVersionEx(rOsVersionInfo) Then
Select Case rOsVersionInfo.PlatformID

http://www.mindfiresolutions.com/Determining-host-operating-system-using-VB-6-189.php
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

XP
Vista
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 
Iguleder


Joined: 11 Aug 2009
Posts: 1906
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
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


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