 |
|
 |
Note: Under C# 4.0, now has : Environment.Is64BitOperatingSystem and Is64BitProcess.
The former will return true if the OS is 64 bit, even if the app is 32 bit. The later will return true only if both the OS AND the current process is 64bit.
|
|
|
|
 |
|
 |
Thank you for this great code. Would you be updating this for Windows 8?
Thank you
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Very nice to show the "steps" getting there!
|
|
|
|
 |
|
 |
Complete and useful - you've tamed this subject! Thanks.
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Thank you for all the research into this and for publishing your findings. I have tried to solve this a few times, only ever getting part of the way. It seems your article and code provides the complete solution, and has already saved me a lot of time. Much appreciated and I voted 5.
Tim
|
|
|
|
 |
|
 |
Compact, to the point and valid.
|
|
|
|
 |
|
 |
Excellent, Jonny-J, just what I needed. A really comprehensive solution to a knotty problem.
If you ever need a contractor, I'd love to spend some time in Sweden or Denmark. C++, C#, ASP, SqlServer etc. CV on request. Example of work at An implementation of Command pattern in C#[^].
Dave
|
|
|
|
 |
|
 |
I might have a few more years on you but a big thanks. I just upgraded to Win7 x64 and it bit me.
|
|
|
|
 |
|
 |
I got the following running you app on WHS:
Operation System Information
----------------------------
Name = Windows Server 2003
Edition = Standard
Service Pack = Service Pack 2
Version = 5.2.3790.131072
ProcessorBits = Bit32
OSBits = Bit32
ProgramBits = Bit32
I would think the 'Edition' should have list Windows Home Server since this is definitely not your standard version of Windows Server 2003. What do you think?
Works as advertised on all my other computers. Thanks for sharing.
|
|
|
|
 |
|
 |
Johnny - Keep posting whatever you find useful for others. Don't bother about the criticism. There are people of all levels on CodeProject and your articles will be definitely helpful to some of them.
This is certainly a time saver, will use it if required sometime. Keep it up.
|
|
|
|
 |
|
 |
Can this offer you more information than System.Environment.OSVersion?
|
|
|
|
 |
|
|
 |
|
 |
Your article was a confirmation to my thoughts that GetEnvironmentVariable("PROCESSOR_ARCHITECTURE") returns the architecture of running application rather than processor architecture.
Thanks! Excellent(5) job!
|
|
|
|
 |
|
 |
Now go and write an article about MessageBox() function...
|
|
|
|
 |
|
 |
Are you completely stupid? There's absolutely no comparison between calling a messagebox function and using PInvoke to get information not available through the framework.
Interesting to look at your profile. You've been a member for 7 years, but you haven't posted one single article yourself, in all that time you have only posted 28 messages, and of those 28 messages, around 1/3 of them are "My vote of 1", and even more than that have been downvoted by one or more members of this forum.
Clearly, you're not the authority to listen to when it comes to professional programming...
Can anybody tell me how we get this jackass banned from the forum?
/Johnny
|
|
|
|
 |
|
 |
You could ask Chris, but better to just ignore him. There are plenty more like him around, and not just on CodeProject. And remember, judging from the votes, bookmarks and rating, there are plenty of people who value your article.
It's time for a new signature.
|
|
|
|
 |
|
 |
Dude you're as lame as your code and your skills (or lack of them) so please spare me your "pinvoke" bullsh*t and copy&paste articles from the msdn's GetVersionEx() api page...
|
|
|
|
 |
|
 |
Has it occurred to you that posting some carefully thought out constructive criticism might be a) better for your own credibility (I've read all your posts on this thread and I still haven't worked out what it is that you don't like about this article); b) a great deal more useful for both the author and the readers, and c) less harmful to your blood pressure. Calling people lame dudes and using words with asterisks in them just makes you look foolish and inarticulate, and as it lacks any actual specific points of contention, doesn't, in my opinion, detract from Jonny J's credibility one iota.
Try using phrases like "There is another way of doing this that is illustrated here...", "Readers may be interested in the following additional information...", or "X's method has the following advantages and disadvantages...". Then you might actually impress people with your knowledge and not just your ability to be unpleasant. You might also think about how you would feel if you'd put a lot of work into an article and got feedback like this. If you have all the experience you claim to have you will know that there is never one right way of solving a problem, and everybody's offerings are useful - maybe even yours!
Dave
|
|
|
|
 |
|
 |
Thanks for spending some of your time to bring us this, I always appreciate these pieces of utility code. This will probably save me a couple of days of research at some point. I am always amazed at those who give low ratings to others when they haven't contributed even one article themselves.
Programming is an art form that fights back.
|
|
|
|
 |
|
 |
Any chance you could be talked into providing a .dll version of OSVersionInfo that non-C# programmers could use with VB.net????
It would be greatly appreciated.
|
|
|
|
 |
|
 |
No problem at all. I'll post it tonight or tomorrow morning. Don't know if it will be updated immediately, otherwise check back in a couple of days...
Cheers,
Johnny
|
|
|
|
 |