 |
|
|
 |
|
|
 |
|
 |
Hi, Hans, is it possible to get updated version of your great class?
Best regards, Vladimir
modified on Thursday, March 25, 2010 6:32 AM
|
|
|
|
 |
|
|
 |
|
 |
Hans,
In addition to the previous posting I have now added the code to determine if the OS is 64-bit. I have tested this on 2008 64-bit/32-bit as well as 2003 32bit, 2003 R2 32-bit, vista 32-bit, win 7 64-bit all with positive results. Please let me know how I can send this to you.
'With hurricanes, tornados, fires out of control,mud slides, flooding, severe thunderstorms tearing up the country! from one end to another, and with the threat of bird flu and terrorist attacks, are we sure this is a good time to take God out of the Pledge of Allegiance?' - Jay Leno
|
|
|
|
 |
|
 |
Thanks for the offer. Please email to me at my gmail address - see About box of demo app. Do not include exe, because gmail will not permit these in zip file.
|
|
|
|
 |
|
|
 |
|
 |
Has this version been released yet, and if so how can I get my sticky fingers on it?
|
|
|
|
 |
|
 |
I can send you the update. What email address do you want it sent to?
'With hurricanes, tornados, fires out of control,mud slides, flooding, severe thunderstorms tearing up the country! from one end to another, and with the threat of bird flu and terrorist attacks, are we sure this is a good time to take God out of the Pledge of Allegiance?' - Jay Leno
|
|
|
|
 |
|
 |
Hi Timothy:
Would you please email your updated codes to kezhu_12@hotmail.com. I am looking for codes to identify 64bit system without lucks.
Thank you in advance for your help.
Kind regards,
Ke
|
|
|
|
 |
|
 |
Maybe you should just post your changes here so that everyone who comes here (and realizes windows 7 isn't supported) can just grab it. Or maybe just post a link of another hosting location?
|
|
|
|
 |
|
 |
I will try to post update soon.
|
|
|
|
 |
|
 |
When is soon?
| Independent ACN representative | | -- Check out the possibilities for your future! | | -- Financial independance | | -- Full time or Part time | | -- In more than 20 countries through North America, Europe, Asia and the Pacific |
Within you lies the power for good - Use it!
|
|
|
|
 |
|
 |
Hans,
I really appreciate your work. I have taken the liberty of updating this class to include the code for "R2" on Server 2003 as well as the code needed for Server 2008, 2008 R2 and Windows 7. I have tested it on all platforms except 2008 R2 as I don't have one running yet. I would like to be able to forward the updated code and demo code to you. How would you like me to send it?
'With hurricanes, tornados, fires out of control,mud slides, flooding, severe thunderstorms tearing up the country! from one end to another, and with the threat of bird flu and terrorist attacks, are we sure this is a good time to take God out of the Pledge of Allegiance?' - Jay Leno
|
|
|
|
 |
|
 |
Hi Timothy, I would not mind borrowing your updated code to save me some time doing the same thing.
|
|
|
|
 |
|
 |
I had forwarded the updates to Hans for review and inclusion. I do not know what has happened since. If Hans does not elect to update the article then I would be happy to forward the updated components. What email should I send it to?
'With hurricanes, tornados, fires out of control,mud slides, flooding, severe thunderstorms tearing up the country! from one end to another, and with the threat of bird flu and terrorist attacks, are we sure this is a good time to take God out of the Pledge of Allegiance?' - Jay Leno
|
|
|
|
 |
|
 |
Use totrkee-codeproject@yahoo.com. By the way, nice Jay Leno quote. Thanks!
|
|
|
|
 |
|
 |
Hi Timothy:
Would you please send your modified codes to
kezhu_12@hotmail.com
Many thanks for your help.
Kind regards,
Ke
|
|
|
|
 |
|
 |
As the version never changes for the life of the object, why not create a new integer member variable, m_nVersion, call the GetWinVersion() function a single time at initialisation, and then just use m_nVersion in all the Is???() functions ?
The same goes for GetWinVersionString().
....Or am I missing something ?
|
|
|
|
 |
|
 |
Could it be possible that by nature this component will be requested to execute very few times during process lifetime? What about design by separation of concern? Could it be that this component's responsibility is about getting the information from the system and that in its current form it happen to be highly cohesive? If so, could it be that additionnal concerns would break that neet cohesion? Could it be pertinent to implement caching at a higher level of abstraction? Would that help separation of concern and keep this neet component as is should be? For me I would suggest 'Nice Class thank you'.
|
|
|
|
 |
|
 |
It's this kind of thinking that results in innefficient design/implementation in the first place. Lots of small inefficiencies often end up making a larger inefficiency. If it can be made more efficient with a few simple changes, and without compromising the design, why not do this ?
Maybe I did come across as being a bit ungrateful in the actual post, but I did put "Nice class..." in the title. Don't get me wrong, I'm not from the school of efficiency at any price, but it's high up my list. This is a useful class and on the whole is well designed and implemented, but it can be improved slightly. Constructive criticism, I think it's called.
|
|
|
|
 |
|
 |
Thank you for replying BUT I had noticed the positive start in title.
A little exageration here for making a point about a counter-productive way of expressing a constructive feedback, the 'but' transition, especially when the rest of the message tends to invalidate the nice beginning.
You will find me interested in debating about efficiency in software as long as the discussion remains open minded and efficient. For this we need to remain objective and precise, and avoid personal judgemental positions.
Inherent complexity is what we deal with in software developement. At first, the engineer sees just an approximation of it and he can do just two things: complicate it or discover its intrinsic nature. The second being the only truly efficient simplification because any simplification besides the intrinsic nature of the problem will necessarily complicates other aspects of the solution.
Booch, Rumbaugh, and Jacobson have all been my masters on day, they felt when they joined together. Today McConnell has replace them because he did just that: intrinsic natural simplification of the software development discipline. Precision in discussion requires expressive and precise vocabulary, I find mine in McConnell's book 'Code Complete'.
A mix of McConnell and extreme programming principles (prototyping and refactoring, what I name 'Just-In-Time abstraction') is what I am using today leading to very efficient development.
Regards
Jean-Marc
|
|
|
|
 |
|
 |
Thanks both to you and Defenestration for some insightful comments. I get so many "how would you call this from VB" type questions that it is a relief to read an intelligent post!
I think your point about complexity is well-taken. What would the return be for introducing added complexity? If the function is only called once at startup, it would seem that the complexity is not worth it. But as you say, it depends on how you're going to use it.
|
|
|
|
 |
|
 |
I know this was posted last August, but I couldn't pass up the barb about "how would you call this from V" and then the comment about the it being a relief to read an intelligent post! I write scripts in both VB and C++/C#, etc. Depending on what I am trying to accomplish at the time.
But, on the VB side, something similar to this works:
Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Public Sub Main()
' Return name of operating system
Dim lret As Long
Dim osverinfo As OSVERSIONINFO
Dim OS As String
Dim GetOsVersion
osverinfo.dwOSVersionInfoSize = Len(osverinfo)
lret = GetVersionEx(osverinfo)
If lret = 0 Then
GetOsVersion = "unknown"
Else
'MsgBox osverinfo.dwPlatformId & "/" & osverinfo.dwMajorVersion & "/" & _
osverinfo.dwMinorVersion
Select Case osverinfo.dwPlatformId & "/" & osverinfo.dwMajorVersion & "/" & _
osverinfo.dwMinorVersion
Case "1/4/0"
GetOsVersion = "Win95"
Case "1/4/10"
GetOsVersion = "Win98"
Case "1/4/90"
GetOsVersion = "WinME"
Case "2/3/51"
GetOsVersion = "WinNT351"
Case "2/4/0"
GetOsVersion = "WinNT4"
Case "2/5/0"
GetOsVersion = "Win2K"
Case "2/5/1"
GetOsVersion = "WinXP"
Case "2/5/2"
GetOsVersion = "Win2003"
Case Else
GetOsVersion = "Unsupported Version"
End Select
End If
OS = GetOsVersion
MsgBox "Operating System Version is : " & OS
End Sub
Just my two cents worth, but thanks for the Class information, it is helpful.
|
|
|
|
 |
|
 |
do you have an update for checking if OS is windows 2008?
thanks
|
|
|
|
 |