Click here to Skip to main content
15,910,787 members

Comments by Member 10258940 (Top 5 by date)

Member 10258940 11-Mar-15 5:36am View    
it mean NetCard UPLOAD Speed and Download Speed....do i need to write a ndis or wfp Driver to attach NetCard ?
Member 10258940 10-Mar-15 2:36am View    
thank you for your help ^_^
Member 10258940 5-Mar-15 3:58am View    
^_^I read cpu temperatures by DTS...read HDD temperatures by WMI MSStorageDriver_ATAPISmartData.....
Member 10258940 3-Mar-15 2:22am View    
i can get frequency.....but i can't get Temperature of cpu and harddisk.......
Member 10258940 3-Mar-15 1:48am View    
Deleted
thank you very much. .... i have another question.......how do i get cpu's and harddisk's temperature.....i try to get it by wmi ...but faild.......i used C...

#define _WIN32_WINNT 0x0400
#define _WIN32_DCOM

#include <stdio.h>
#include <tchar.h>
#include <windows.h>
#include <wbemidl.h>
#pragma comment(lib,"wbemuuid.lib")

VOID GetCPUTemperatureInfo()
{
// result code from COM calls
HRESULT hr = 0;

// COM interface pointers
IWbemLocator *locator = NULL;
IWbemServices *services = NULL;
IEnumWbemClassObject *results = NULL;

// BSTR strings we'll use (http://msdn.microsoft.com/en-us/library/ms221069.aspx)
BSTR resource = SysAllocString(L"ROOT\\CIMV2");
BSTR language = SysAllocString(L"WQL");
BSTR query = SysAllocString(L"SELECT * FROM Win32_TemperatureProbe");

// initialize COM
hr = CoInitializeEx(0, COINIT_MULTITHREADED);
hr = CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);

// connect to WMI
hr = CoCreateInstance(&CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, &IID_IWbemLocator, (LPVOID *) &locator);
hr = locator->lpVtbl->ConnectServer(locator, resource, NULL, NULL, NULL, 0, NULL, NULL, &services);

// issue a WMI query
hr = services->lpVtbl->ExecQuery(services, language, query, WBEM_FLAG_BIDIRECTIONAL, NULL, &results);

// list the query results
if (results != NULL) {
IWbemClassObject *result = NULL;
ULONG returnedCount = 0;

// enumerate the retrieved objects
while((hr = results->lpVtbl->Next(results, WBEM_INFINITE, 1, &result, &returnedCount)) == S_OK) {
VARIANT CurrentReading;

// obtain the desired properties of the next result and print them out
hr = result->lpVtbl->Get(result, L"CurrentReading", 0, &CurrentReading, 0, 0);

printf(L"CurrentReading: %d\n", CurrentReading);

// release the current result object
result->lpVtbl->Release(result);
}
}

// release WMI COM interfaces
results->lpVtbl->Release(results);
services->lpVtbl->Release(services);
locator->lpVtbl->Release(locator);

// unwind everything else we've allocated
CoUninitialize();

SysFreeString(query);
SysFreeString(language);
SysFreeString(resource);

return;
}