Windows Version
-
-
Hi I have a project that is dependent on some of the laiter windows platforms for some of it's functionallity so the question is is there a way of determinig the OS running. and how many different windows platforms are there. can anyone help me. G_S
G_S wrote: how many different windows platforms are there. Lots. I'm serious - if you factor in all the various versions of IE, the service packs, the Win9x and WinNT lines, it's a frighteningly large number. Generally, if you wish to use an API that only exists in certain versions, you're best finding a way to include the redistributable for that API along with your install. Failing that, test for the existence of the API prior to using it (for regular APIs, that usually means
LoadLibrary()
+GetProcAddress()
rather than static linking). For other platform-dependant functionality (such as registry locations, file formats), you're gonna have to either get more creative, or write for the lowest common denominator.You must be careful in the forest Broken glass and rusty nails If you're to bring back something for us I have bullets for sale...
-
G_S wrote: how many different windows platforms are there. Lots. I'm serious - if you factor in all the various versions of IE, the service packs, the Win9x and WinNT lines, it's a frighteningly large number. Generally, if you wish to use an API that only exists in certain versions, you're best finding a way to include the redistributable for that API along with your install. Failing that, test for the existence of the API prior to using it (for regular APIs, that usually means
LoadLibrary()
+GetProcAddress()
rather than static linking). For other platform-dependant functionality (such as registry locations, file formats), you're gonna have to either get more creative, or write for the lowest common denominator.You must be careful in the forest Broken glass and rusty nails If you're to bring back something for us I have bullets for sale...
-
Hi I have a project that is dependent on some of the laiter windows platforms for some of it's functionallity so the question is is there a way of determinig the OS running. and how many different windows platforms are there. can anyone help me. G_S
G_S wrote: is there a way of determinig the OS running. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/osversioninfo_str.asp[^] But like Shog said, if you use unsupported API's, then you need to dynamically load them, or your app won't run, even if you never run the code that calls them. The alternative is to write your own versions. I did that with TransparentBlt and AlphaBlend many years ago, so I could support W95 and still call them. G_S wrote: how many different windows platforms are there. Assuming you start with W95, there's W95, W98, NT4, WME, W2000, WXP. Then W98 has service pack 2 to consider, that added a lot, from memory. Christian Graus - Microsoft MVP - C++
-
G_S wrote: is there a way of determinig the OS running. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/osversioninfo_str.asp[^] But like Shog said, if you use unsupported API's, then you need to dynamically load them, or your app won't run, even if you never run the code that calls them. The alternative is to write your own versions. I did that with TransparentBlt and AlphaBlend many years ago, so I could support W95 and still call them. G_S wrote: how many different windows platforms are there. Assuming you start with W95, there's W95, W98, NT4, WME, W2000, WXP. Then W98 has service pack 2 to consider, that added a lot, from memory. Christian Graus - Microsoft MVP - C++
-
Thank you for the link. So the best work around the dependencies is to dynamically load and test for the functins. Thanks for the anwser this helps. G_S
No, the best way is to use the link I gave you to find out what OS you have, then to dynamically load the functions and only allow the code to use them based on the results of that test, which will have told you if they are present, based on OS version. There's only one test involved, the dynamic loading is because otherwise Windows will try to load the functions, even if they don't exist, regardless of the fact that your code deals with that problem for you. Christian Graus - Microsoft MVP - C++
-
Hi I have a project that is dependent on some of the laiter windows platforms for some of it's functionallity so the question is is there a way of determinig the OS running. and how many different windows platforms are there. can anyone help me. G_S
I use this code snippet
:suss: Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!