HSPポータル
サイトマップ お問い合わせ


HSPTV!掲示板


未解決 解決 停止 削除要請

2016
1013
てきすとCPUの温度取得5未解決


てきすと

リンク

2016/10/13(Thu) 22:20:43|NO.77107

CPUの温度を取得したいのですが、取得の方法がわかりません。

http://blog.goo.ne.jp/hiro239415/e/b0fb4ec697b8dbb34645f9600f4fac9a
WMIを使えばいけるのでしょうか?
いろいろ検索してもわかりません。
できればdllを使わずに取得したいです。
あとファンの回転数なども取得できるのでしょうか?
よろしくお願いします。



この記事に返信する


Fooooooooooooooo

リンク

2016/10/14(Fri) 16:31:34|NO.77113

ちゃんとググりましたか?



てきすと

リンク

2016/10/14(Fri) 18:42:53|NO.77117

いろいろと調べましたがよくわからないので質問しました。

http://www.hsptv.sakura.ne.jp/play/pforum.php?mode=pastwch&num=69883
過去のものがあったのですが。。。



てきすと

リンク

2016/10/15(Sat) 13:34:13|NO.77139

これもありました
http://language-and-engineering.hatenablog.jp/entry/20150516/CpuTemperatureMeasuringWshBatch
HSPで使うにはどうすればいいでしょうか?



Cheesehamburg7273

リンク

2016/10/15(Sat) 19:21:43|NO.77159

これとかどうですか?

#module WMImodule #uselib "ole32.dll" #func CoSetProxyBlanket "CoSetProxyBlanket" comobj,int,int,int,int,int,int,int #define IID_IWbemLocator "{dc12a687-737f-11cf-884d-00aa004b2e24}" #define CLSID_WbemLocator "{4590f811-1d3a-11d0-891f-00aa004b2e24}" #usecom IWbemLocator IID_IWbemLocator CLSID_WbemLocator #comfunc WbemLoc_ConnectServer 3 wstr,int,int,int,int,int,int,var #define IID_IWbemServices "{9556dc99-828c-11cf-a37e-00aa003240c7}" #define CLSID_WbemServices "{D68AF00A-29cb-43fa-8504-ce99a996d9ea}" #usecom IWbemServices IID_IWbemServices CLSID_WbemServices #comfunc WbemSvc_ExecQuery 20 wstr,wstr,int,int,var #define IID_IEnumWbemClassObject "{027947e1-d731-11ce-a357-000000000001}" #define CLSID_EnumWbemClassObject "{1b1cad8c-2dab-11d2-b604-00104b703efd}" #usecom IEnumWbemClassObject IID_IEnumWbemClassObject CLSID_EnumWbemClassObject #comfunc EnumWbem_Reset 3 #comfunc EnumWbem_Next 4 int,int,var,var #define IID_IWbemClassObject "{dc12a681-737f-11cf-884d-00aa004b2e24}" #define CLSID_WbemClassObject "{9A653086-174F-11d2-B5F9-00104B703EFD}" #usecom IWbemClassObject IID_IWbemClassObject IID_IWbemClassObject #comfunc WbemClsObj_Get 4 wstr,int,var,int,int #deffunc GetWMIData array data,str query,str type newcom pLoc, IWbemLocator if( stat == 0 ){ WbemLoc_ConnectServer pLoc, "root\\cimv2", 0, 0, 0, 0, 0, 0, ppSvc if( stat == 0 ){ newcom pSvc, IWbemServices, -1, ppSvc if( stat == 0 ){ CoSetProxyBlanket pSvc,10,0,0,3,3,0,0 if( stat == 0 ){ WbemSvc_ExecQuery pSvc, "WQL", query, 48, 0, ppEnum if( stat == 0 ){ newcom pEnum, IEnumWbemClassObject, -1, ppEnum if( stat == 0 ){ dimtype vRet, vartype("variant") repeat EnumWbem_Next pEnum, -1, 1, ppclsObj, uReturn if( uReturn == 0 ) : break newcom pclsObj, IWbemClassObject, -1, ppclsObj if( stat == 0 ){ WbemClsObj_Get pclsObj, type, 0, vRet, 0, 0 data(cnt) = vRet("value") delcom pclsObj } loop delcom pEnum } } } delcom pSvc } } delcom pLoc } return #global screen 0, 500, 500 : title "WMI SAMPLE" pos 100, 0 : mbData = "" : mesbox mbData, 400, 500 objsize 100, 20 : pos 0, 0 button gosub "1394Controller", *change : query(0) = "Select * from Win32_1394Controller" button gosub "Account", *change : query(1) = "Select * from Win32_Account" button gosub "BaseBoard", *change : query(2) = "Select * from Win32_BaseBoard" button gosub "BIOS", *change : query(3) = "Select * from Win32_BIOS" button gosub "Bus", *change : query(4) = "Select * from Win32_Bus" button gosub "CDROMDrive", *change : query(5) = "Select * from Win32_CDROMDrive" button gosub "DiskPartition", *change : query(6) = "Select * from Win32_DiskPartition" button gosub "Display", *change : query(7) = "Select * from Win32_DisplayControllerConfiguration" button gosub "Fan", *change : query(8) = "Select * from Win32_Fan" button gosub "HeatPipe", *change : query(9) = "Select * from Win32_HeatPipe" button gosub "Keyboard", *change : query(10) = "Select * from Win32_Keyboard" button gosub "LogicalDisk", *change : query(11) = "Select * from Win32_LogicalDisk" button gosub "MemoryArray", *change : query(12) = "Select * from Win32_MemoryArray" button gosub "Process", *change : query(13) = "Select * from Win32_Process" button gosub "Processor", *change : query(14) = "Select * from Win32_Processor" button gosub "Product", *change : query(15) = "Select * from Win32_Product" button gosub "USB", *change : query(16) = "Select * from Win32_USBController" button gosub "Video", *change : query(17) = "Select * from Win32_VideoController" button gosub "Volume", *change : query(18) = "Select * from Win32_Volume" stop *change sdim data, 64 : mbData = "" : GetWMIData data, query(stat-1), "Name" repeat length(data) : mbData += data(cnt) + "\n" : loop objprm 0, mbData return



てきすと

リンク

2016/10/15(Sat) 22:02:04|NO.77163

それなのですが。。。
WMIをつかって取得する場合どうすればいいのでしょうか?
http://language-and-engineering.hatenablog.jp/entry/20150516/CpuTemperatureMeasuringWshBatch
こちらです。



ONION software Copyright 1997-2023(c) All rights reserved.