develooper Front page | perl.perl5.porters | Postings from July 2003

Re: [PATCH] Extend Win32::GetOSVersion() to return additional information

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
July 30, 2003 03:42
Subject:
Re: [PATCH] Extend Win32::GetOSVersion() to return additional information
Message ID:
20030730041356.GA20150@windhund.schwern.org
On Tue, Jul 29, 2003 at 07:14:10PM -0700, Jan Dubois wrote:
> The attached patch adds the additional information available from the
> OSVERSIONINFOEX structure to the list of values returned by
> Win32::GetOSVersion().  This information is available for Windows
> NT 4 SP6 and later.
> 
> I believe this patch is "low risk", but I'll understand if Jarkko doesn't
> want to apply it to 5.8.1.  :)
> 
> The actual patch below is against the latest ActivePerl 5.6.1 source, but
> it does integrate cleanly (with offset of about 400 lines) into 5.8 too.

> +[CORE] Returns the list (STRING, MAJOR, MINOR, BUILD, ID), where the
<snip>
> +On Windows NT 4 SP6 and later this function returns the following
> +additional values: SPMAJOR, SPMINOR, SUITEMASK, PRODUCTTYPE.
<snip>

This is just SCREAMING for a hash.  Perhaps instead of (or in addition to)
extending GetOSVersion() you could supply a similar function which returns
this information as a hash?


> +SUITEMASK is a bitfield identifying the product suites available on
> +the system.  Known bits are:
> +
> +    VER_SUITE_SMALLBUSINESS             0x00000001
> +    VER_SUITE_ENTERPRISE                0x00000002
> +    VER_SUITE_BACKOFFICE                0x00000004
> +    VER_SUITE_COMMUNICATIONS            0x00000008
> +    VER_SUITE_TERMINAL                  0x00000010
> +    VER_SUITE_SMALLBUSINESS_RESTRICTED  0x00000020
> +    VER_SUITE_EMBEDDEDNT                0x00000040
> +    VER_SUITE_DATACENTER                0x00000080
> +    VER_SUITE_SINGLEUSERTS              0x00000100
> +    VER_SUITE_PERSONAL                  0x00000200
> +    VER_SUITE_BLADE                     0x00000400
> +    VER_SUITE_EMBEDDED_RESTRICTED       0x00000800
> +    VER_SUITE_SECURITY_APPLIANCE        0x00001000
> +
> +The VER_SUITE_xxx names are listed here to crossreference the Microsoft
> +documentation.  The Win32 module does not provide symbolic names for these
> +constants.

Any reason why not other than a lack of tuits?


-- 
Cuius rei demonstrationem mirabilem sane detexi hanc subscriptis 
exiguitas non caperet.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About