亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2170 | 回復(fù): 8
打印 上一主題 下一主題

在WINDOWS下用PERL得到顯卡容量大小用那個模塊!! [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2009-12-07 11:32 |只看該作者 |倒序瀏覽
幫幫忙。。

[ 本帖最后由 zhangkeyijian 于 2009-12-7 12:27 編輯 ]

論壇徽章:
0
2 [報告]
發(fā)表于 2009-12-07 12:15 |只看該作者
dmesg里頭直接取就可以吧?

Linux agpgart interface v0.103
agpgart-intel 0000:00:00.0: Intel 440BX Chipset
agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0x0

論壇徽章:
0
3 [報告]
發(fā)表于 2009-12-07 12:26 |只看該作者
謝謝。 在linux里可以用這個方法!

  我想在WINDOWS下實現(xiàn)這個效果。

真不好意思,沒有把標(biāo)題說清楚!

論壇徽章:
0
4 [報告]
發(fā)表于 2009-12-07 12:37 |只看該作者
Found this while I'm not sure if it's the right one for you:

http://search.cpan.org/~scottvr/perl-vgalib-0.4/vga.pm

論壇徽章:
0
5 [報告]
發(fā)表于 2009-12-07 21:07 |只看該作者

回復(fù) #1 zhangkeyijian 的帖子

http://search.cpan.org/~corion/DBD-WMI-0.06/lib/DBD/WMI.pm

http://msdn.microsoft.com/en-us/library/aa394512%28VS.85%29.aspx

use DBI;
my $dbh = DBI->connect('dbi:WMI:');

my $sth = $dbh->prepare(<<WQL);
SELECT * FROM Win32_VideoController
WQL

$sth->execute();
while (my @row = $sth->fetchrow) {
my $dev = $row[0];
print join "\t",$dev->{DeviceID},$dev->{AdapterRAM};
print "\n";
}

VideoController1        134217728
VideoController2        134217728

[ 本帖最后由 mwm5 于 2009-12-7 21:46 編輯 ]

論壇徽章:
0
6 [報告]
發(fā)表于 2009-12-07 21:22 |只看該作者

論壇徽章:
0
7 [報告]
發(fā)表于 2009-12-07 21:33 |只看該作者

回復(fù) #1 zhangkeyijian 的帖子

Using Windows WMI or Powershell. it's very easy to get many
informations about PC, so CPAN provides DBD::WMI module to
to do that.
i.e.:  PS C:\> Get-WmiObject Win32_DisplayConfiguration
...
PelsHeight           : 768
PelsWidth            : 1024
SettingID            : GeForce4 440 (64M)
SpecificationVersion : 1025


Install DBD::WMI
C:\>ppm install DBD::WMI
Read docu first
C:\>perldoc DBD::WMI

Sample Code to get display info.:
use strict;
use DBI;

my $dbh = DBI->connect('dbi:WMI:');
my @fields = qw (
    BitsPerPel
    Caption
    Description
    DeviceName
    DisplayFlags
    DisplayFrequency
    DitherType
    DriverVersion
    ICMIntent
    ICMMethod
    LogPixels
    PelsHeight
    PelsWidth
    SettingID
    SpecificationVersion
);
my $wql = "SELECT ". join(", ", @fields). " FROM Win32_DisplayConfiguration";
my $sth = $dbh->prepare($wql);
$sth->execute();
my @ary = $dbh->selectrow_array($sth);
foreach my $cnt (0 .. $#fields) {
        print $fields[$cnt], ": ", ($ary[$cnt]) ? $ary[$cnt] : "undef", "\n";
}
exit;

論壇徽章:
0
8 [報告]
發(fā)表于 2009-12-07 22:01 |只看該作者
原帖由 ulmer 于 2009-12-7 21:33 發(fā)表
Using Windows WMI or Powershell. it's very easy to get many
informations about PC, so CPAN provides DBD::WMI module to
to do that.


Install DBD::WMI
C:\>ppm install DBD::WMI
Read docu fi ...


For WMI Win32_VideoController Class:
@fields = qw(
    AcceleratorCapabilities AdapterCompatibility AdapterDACType  AdapterRAM
   Availability CapabilityDescriptions Caption ColorTableEntries
   ConfigManagerErrorCode ConfigManagerUserConfig CreationClassName
   Win32_VideoController CurrentBitsPerPixel CurrentHorizontalResolution
   CurrentNumberOfColors CurrentNumberOfColumns CurrentNumberOfRows
   CurrentRefreshRate CurrentScanMode CurrentVerticalResolution
   Description DeviceID DeviceSpecificPens DitherType DriverDate
   DriverVersion ErrorCleared ErrorDescription ICMIntent ICMMethod
    InfFilename InfSection InstallDate  InstalledDisplayDrivers
    LastErrorCode MaxMemorySupported MaxNumberControlled
    MaxRefreshRate  MinRefreshRate Monochrome Name NumberOfColorPlanes
    NumberOfVideoPages PNPDeviceID PowerManagementCapabilities
    PowerManagementSupported ProtocolSupported ReservedSystemPaletteEntries
    SpecificationVersion  Status  StatusInfo SystemCreationClassName
    SystemName  SystemPaletteEntries TimeOfLastReset  VideoArchitecture
    VideoMemoryType  VideoMode  VideoModeDescription  VideoProcessor
);
$wql = "SELECT ". join(", ", @fields). " FROMWin32_VideoController";   

論壇徽章:
0
9 [報告]
發(fā)表于 2009-12-08 11:37 |只看該作者
原帖由 ulmer 于 2009-12-7 21:33 發(fā)表
Using Windows WMI or Powershell. it's very easy to get many
informations about PC, so CPAN provides DBD::WMI module to
to do that.


Install DBD::WMI
C:\>ppm install DBD::WMI
Read docu fi ...



PS C:\> Get-WmiObject Win32_VideoController|select AdapterRAM

                                                                     AdapterRAM
                                                                     ----------
                                                                      536870912



[ 本帖最后由 xti9er 于 2009-12-8 11:41 編輯 ]
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP