burak / CPAN-Sys-Info-Driver-Windows
Windows driver for Sys::Info (Perl)
$ hg clone http://bitbucket.org/burak/cpan-sys-info-driver-windows/
| commit 21: | b005616dd180 |
| parent 20: | 5f44567f0948 |
| branch: | default |
12 months ago
Changed (Δ122 bytes):
Changes (3 lines added, 0 lines removed)
PREREQ (2 lines added, 2 lines removed)
Windows.xs (18 lines added, 18 lines removed)
lib/Sys/Info/Driver/Windows.pm (1 lines added, 1 lines removed)
lib/Sys/Info/Driver/Windows/Device.pm (1 lines added, 1 lines removed)
lib/Sys/Info/Driver/Windows/Device/CPU.pm (1 lines added, 1 lines removed)
lib/Sys/Info/Driver/Windows/Device/CPU/WMI.pm (1 lines added, 1 lines removed)
lib/Sys/Info/Driver/Windows/OS.pm (1 lines added, 1 lines removed)
lib/Sys/Info/Driver/Windows/OS/Editions.pm (1 lines added, 1 lines removed)
lib/Sys/Info/Driver/Windows/OS/Net.pm (1 lines added, 1 lines removed)
| … | … | @@ -2,6 +2,9 @@ Revision history for Perl extension Sys: |
2 |
2 |
|
3 |
3 |
Time zone is GMT+2. |
4 |
4 |
|
5 |
0.70 Mon Apr 6 03:54:23 2009 |
|
6 |
=> Bump version for new stable release. |
|
7 |
||
5 |
8 |
0.69_11 Sat Apr 4 06:04:21 2009 |
6 |
9 |
=> Implement os->bitness cpu->bitness. |
7 |
10 |
| … | … | @@ -11,8 +11,8 @@ use vars qw(%PREREQ %RECOMMEND %BUILD_RE |
11 |
11 |
|
12 |
12 |
%PREREQ = ( |
13 |
13 |
'IO::File' => 0, |
14 |
'Sys::Info::Base' => '0.69_11', |
|
15 |
'Sys::Info::Driver::Unknown' => '0.69_11', |
|
14 |
'Sys::Info::Base' => '0.70', |
|
15 |
'Sys::Info::Driver::Unknown' => '0.70', |
|
16 |
16 |
'ExtUtils::CBuilder' => 0, |
17 |
17 |
'Win32::OLE' => 0, |
18 |
18 |
); |
| … | … | @@ -56,8 +56,8 @@ PPCODE: |
56 |
56 |
"GetNativeSystemInfo" |
57 |
57 |
); |
58 |
58 |
|
59 |
wProcessBitness = 0; |
|
60 |
wProcessorBitness = 0; |
|
59 |
wProcessBitness = 0; |
|
60 |
wProcessorBitness = 0; |
|
61 |
61 |
bIsWow = FALSE; |
62 |
62 |
|
63 |
63 |
(NULL != pGNSI) ? pGNSI(&si) : GetSystemInfo(&si); |
| … | … | @@ -71,24 +71,24 @@ PPCODE: |
71 |
71 |
lstrcpy( wProcessorArchitecture2, TEXT("Alpha")); |
72 |
72 |
wsprintf( wProcessorModel , TEXT("%d"), HIBYTE(si.wProcessorRevision) ); |
73 |
73 |
wsprintf( wProcessorStepping , TEXT("%d"), LOBYTE(si.wProcessorRevision) ); |
74 |
wProcessBitness = 64; |
|
75 |
wProcessorBitness = 64; |
|
74 |
wProcessBitness = 64; |
|
75 |
wProcessorBitness = 64; |
|
76 |
76 |
break; |
77 |
77 |
|
78 |
78 |
case PROCESSOR_ARCHITECTURE_IA64: |
79 |
79 |
lstrcpy( wProcessorArchitecture2, TEXT("IA-64")); |
80 |
80 |
wsprintf( wProcessorModel , TEXT("%d"), HIBYTE(si.wProcessorRevision) ); |
81 |
81 |
wsprintf( wProcessorStepping , TEXT("%d"), LOBYTE(si.wProcessorRevision) ); |
82 |
wProcessBitness = 64; |
|
83 |
wProcessorBitness = 64; |
|
82 |
wProcessBitness = 64; |
|
83 |
wProcessorBitness = 64; |
|
84 |
84 |
break; |
85 |
85 |
|
86 |
86 |
case PROCESSOR_ARCHITECTURE_ALPHA64: |
87 |
87 |
lstrcpy(wProcessorArchitecture2 , TEXT("Alpha64")); |
88 |
88 |
wsprintf( wProcessorModel , TEXT("%d"), HIBYTE(si.wProcessorRevision) ); |
89 |
89 |
wsprintf( wProcessorStepping , TEXT("%d"), LOBYTE(si.wProcessorRevision) ); |
90 |
wProcessBitness = 64; |
|
91 |
wProcessorBitness = 64; |
|
90 |
wProcessBitness = 64; |
|
91 |
wProcessorBitness = 64; |
|
92 |
92 |
break; |
93 |
93 |
|
94 |
94 |
case PROCESSOR_ARCHITECTURE_INTEL: |
| … | … | @@ -108,21 +108,21 @@ PPCODE: |
108 |
108 |
if (bIsWow) { |
109 |
109 |
pGNSI(&si2); |
110 |
110 |
if (si2.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64) { |
111 |
wProcessBitness = 32; |
|
112 |
wProcessorBitness = 64; |
|
111 |
wProcessBitness = 32; |
|
112 |
wProcessorBitness = 64; |
|
113 |
113 |
//printf("32 bit process on IA64"); |
114 |
114 |
} else if (si2.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) { |
115 |
wProcessBitness = 32; |
|
116 |
wProcessorBitness = 64; |
|
115 |
wProcessBitness = 32; |
|
116 |
wProcessorBitness = 64; |
|
117 |
117 |
//printf("32 bit process on AMD64"); |
118 |
118 |
} else { |
119 |
119 |
//printf("I am running in the future!"); |
120 |
120 |
} |
121 |
121 |
} else { |
122 |
wProcessorBitness = (si.wProcessorLevel == 6 && si.wProcessorRevision >= 14) |
|
123 |
? 64 // Core2 |
|
124 |
: 32; |
|
125 |
wProcessBitness = 32; |
|
122 |
wProcessorBitness = (si.wProcessorLevel == 6 && si.wProcessorRevision >= 14) |
|
123 |
? 64 // Core2 |
|
124 |
: 32; |
|
125 |
wProcessBitness = 32; |
|
126 |
126 |
} |
127 |
127 |
} |
128 |
128 |
} |
| … | … | @@ -183,8 +183,8 @@ PPCODE: |
183 |
183 |
PUSHs( sv_2mortal( newSVpv( "wProcessBitness" , 0 ) ) ); |
184 |
184 |
PUSHs( sv_2mortal( newSViv( wProcessBitness ) ) ); |
185 |
185 |
|
186 |
PUSHs( sv_2mortal( newSVpv( "wProcessorBitness" , 0 ) ) ); |
|
187 |
PUSHs( sv_2mortal( newSViv( wProcessorBitness ) ) ); |
|
186 |
PUSHs( sv_2mortal( newSVpv( "wProcessorBitness" , 0 ) ) ); |
|
187 |
PUSHs( sv_2mortal( newSViv( wProcessorBitness ) ) ); |
|
188 |
188 |
|
189 |
189 |
} |
190 |
190 |
else { |
Up to file-list lib/Sys/Info/Driver/Windows.pm:
| … | … | @@ -14,7 +14,7 @@ use constant SM_SERVERR2 => 89; # Win |
14 |
14 |
use Exporter (); |
15 |
15 |
use XSLoader; |
16 |
16 |
|
17 |
$VERSION = '0. |
|
17 |
$VERSION = '0.70'; |
|
18 |
18 |
@ISA = qw( Exporter ); |
19 |
19 |
@EXPORT = qw( ); |
20 |
20 |
%EXPORT_TAGS = ( |
Up to file-list lib/Sys/Info/Driver/Windows/Device.pm:
| … | … | @@ -2,7 +2,7 @@ package Sys::Info::Driver::Windows::Devi |
2 |
2 |
use strict; |
3 |
3 |
use vars qw( $VERSION ); |
4 |
4 |
|
5 |
$VERSION = '0. |
|
5 |
$VERSION = '0.70'; |
|
6 |
6 |
|
7 |
7 |
1; |
8 |
8 |
Up to file-list lib/Sys/Info/Driver/Windows/Device/CPU.pm:
| … | … | @@ -9,7 +9,7 @@ use Sys::Info::Constants qw( :windows_re |
9 |
9 |
use Sys::Info::Driver::Windows qw( :info ); |
10 |
10 |
use Carp qw( croak ); |
11 |
11 |
|
12 |
$VERSION = '0. |
|
12 |
$VERSION = '0.70'; |
|
13 |
13 |
|
14 |
14 |
my $REG; |
15 |
15 |
TRY_TO_LOAD: { |
Up to file-list lib/Sys/Info/Driver/Windows/Device/CPU/WMI.pm:
| … | … | @@ -5,7 +5,7 @@ use Win32::OLE qw (in); |
5 |
5 |
use Sys::Info::Driver::Windows qw(:WMI); |
6 |
6 |
use base qw( Sys::Info::Base ); |
7 |
7 |
|
8 |
$VERSION = '0. |
|
8 |
$VERSION = '0.70'; |
|
9 |
9 |
|
10 |
10 |
my $WMI_INFO = { |
11 |
11 |
CpuStatus => { |
Up to file-list lib/Sys/Info/Driver/Windows/OS.pm:
| … | … | @@ -2,7 +2,7 @@ package Sys::Info::Driver::Windows::OS; |
2 |
2 |
use strict; |
3 |
3 |
use vars qw( $VERSION ); |
4 |
4 |
|
5 |
$VERSION = '0. |
|
5 |
$VERSION = '0.70'; |
|
6 |
6 |
|
7 |
7 |
use base qw( Sys::Info::Driver::Windows::OS::Editions ); |
8 |
8 |
use Win32; |
