Thoughts on std.system.OS

Regan Heath regan at netmail.co.nz
Tue Aug 16 03:02:22 PDT 2011


I have current C/C++/C# code which obtains and uses the windows major  
version number.  In the most recent cases we use it to determine if UAC is  
a possibilty (major version >= 6, which includes Vista, 7, and Server  
2008).  In the past we have used it to determine whether a delay load dll  
should be present.  Having to use a compound IF with an ENUM for each and  
every windows platform would be less nice than using the major version  
number directly.  So, having a phobos function to get it would be nice,  
plus it saves people having to find and code the C function call  
themselves.  I don't have any preference for which module it might go in,  
nor do I understand the other OS versioning well enough to have an opinion  
on whether it makes sense to make this a cross platform feature, or just  
windows specific.


More information about the Digitalmars-d mailing list