|
Is it possible to get the current CPU load/usage just as in the TaskManager ?
|
|
|
|
|
In regsistry there is a hidden branch - hkey_perfomance_data. Just read key values from it
|
|
|
|
|
Thanx. But how do you read/view hidden keys ?
|
|
|
|
|
Try sth like this below:
HKEY hKey = 0;
TCHAR vendorData [64];
DWORD data = 0;
DWORD dataSize = 0;
LONG result = ::RegOpenKeyEx(HKEY_LOCAL_MACHINE,
_T("Hardware\\Description\\System\\CentralProcessor\\0"), 0, KEY_QUERY_VALUE, &hKey);
if(result == ERROR_SUCCESS)
{
//get Mhz:
result = ::RegQueryValueEx(hKey, _T("~MHz"), NULL, NULL,(LPBYTE)&data, &dataSize);
if(result == ERROR_SUCCESS)
PROCESSOR IS data MHZ
else
IT IS UNKNOWN (fe: W9X)
//get the vendor data:
dataSize = sizeof (vendorData);
result = ::RegQueryValueEx(hKey, _T("VendorIdentifier"), NULL, NULL, (LPBYTE)vendorData, &dataSize);
}
RegCloseKey (hKey);
The above code works for me, but only on NT systems.
|
|
|
|
|
Where Can I Find this Windows Version for download (the Release version)
on a web site or a good no RATIO FTP site, PLZ !
BLaZe
ICQ # 110244345
email : mpblaze@iquebec.com
|
|
|
|
|
Hi,
I am working with an application that has to run 24x7. I would like to be able to monitor system resources within the applicatin so that I can signal it to shut down if resource levels become critical. I have had a look at things like WMI etc but am unsure as to how to go about this. Any tips would be much appreciated.
Bruce
|
|
|
|
|
24x7? On Windows ME? You must be kidding
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
You should be able to get system information with (I think...) GetSystemInfo(...). There are also calls to get resource information etc.
There was an article I read somewhere about someone using Windows 98 in a 24x7 configuration. If only I knew where I read it. It is going to take a fair number of 24 hour days to make sure that the system is stable to last a few 24 hour days. The author of the article went through about 4 different hardware combinations before he managed to get stable drivers for his system.
I did a project in the past with Windows 98 and it would last about a week before needing to be restarted. Fortunately it just hung and the UI froze so our customers would simply restart their PC when it happened.
"Harland Pepper, would you stop naming nuts" - Harland Pepper
|
|
|
|
|
I admit this is a shameless plug for my product.
Check out MemWatcher at www.matrixsoftware.com. It may help your Win9x machine run longer without running out of resources. I use it to keep my 98 PC running for days without rebooting. Of course, you may be better off running NT/2K.
In all fairness, there's a competing product called MemTurbo (wwwmemturbo.com), but I find mine more useful and somewhat easier to use. I'm about to release a new version (free to existing users) in a few days.
Thanks,
/ravi
|
|
|
|
|
24 x 7 on a Win9x (that includes WinMe) is a non starter. There is an internal
timer that rolls around on day 49. When this happens the box freezes.
The resource limit on Win9x is 2GB, so if you have any sort of systematic leak
of handles or related resources, you will hit that hard limit sooner or later.
I'd recommend doing this work on WinNT.
Stephen Kellett
--
C++/Java/Win NT/Unix variants
Memory leaks/corruptions/performance/system problems. UK based.
Problems with RSI/WRULD? Contact me for advice.
|
|
|
|
|
Doh! Did I write 2GB, I think I meant 2MB.
Stephen Kellett
--
C++/Java/Win NT/Unix variants
Memory leaks/corruptions/performance/system problems. UK based.
Problems with RSI/WRULD? Contact me for advice.
|
|
|
|
|
For some resean ,I need CASL compipler.
Please send it to me if you are not busy.
Thank you at first.
My Email is : risking@21cn.com
I am so foolish
So don't laugh at me
|
|
|
|
|
Is there a possibility to measure the CPU time of a C++ program part under Windows NT, similar to exploiting the processing report files in the directory /proc under Solaris?
Thanks!
|
|
|
|
|
Check out the PDH functions in the Platform SDK under Base Services\Performance Monitoring.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
|
Take a look at GetThreadTime() and GetProcessTime() API calls ( they are NT-only).
"Harland Pepper, would you stop naming nuts" - Harland Pepper
|
|
|
|
|
I have an application that is scheduled to run on the Windows Scheduler. It has been doing a good job running on NT 4.0 Server with all the SPs.
The story on Windows 2000 Server is slightly different. Sometimes it works. Sometimes it runs and at the end of the application it crashes, and sometimes it runs and then hangs at the end (as in it shows as running on the scheduled tasks forever even after it has done its job).
The application is quite simple in itself. It takes some input parameters from the commandline and then based on the command line in creates one of three COM objects that do some stuff.
in order to try and catch the problem I ended up installing VC++ 6.0 on one of the 2000 servers. Voila! The problem vanished. I obviously cannot go about installing VC++ on all of my servers.
Any clues?
Thanks
|
|
|
|
|
I think you have some problem with the MFC shared DLLs(outdated I guess). Now there is a service pack 2 for Windows 2000. Try it! It may solve your problem.
"To err is human, to forgive - divine"
|
|
|
|
|
Hi !
When I'm trying to run StarTeam 4.2 client on my w2k server (terminal server) I got an error?
Is there some solutions. On w2k workstation it wotks perfectly - but I need it work on w2k server (TS).
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@mailru.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|
|
Hi,
Does anyone know of a good, basic Intermediate style NDIS driver example (with source) for Windows CE 3.0? We are porting one we did for Windows NT, but would like a cleaner reference version to make sure that we are not missing anything in the port.
Or has anyone done an IM driver for WinCE 3.0 and would be willing to share anything that caused them indigestion in the porting effort (other than the obvious functionality that NT has that WinCE does not).
Thanks,
|
|
|
|
|
Hi,
Has anyone used the USB Storage driver, USBSTOR.SYS, that comes with Win2K in concert with an application to talk to a CD-R drive? I'm not referring to the drive appearing in My Computer, or the Explorer but, rather to being able to issue commands to the drive via Transparent SCSI commands. E.g. Request Sense, getting media type/size, opening/closing the drawer, etc.
Has anyone found any detailed documentation from Microsoft on this driver and how to use it to directly talk to USB storage devices? I know that the version on Win2K has some problems and limitations..
Thanks for any assistance..
|
|
|
|
|
W2K has the ability to remember info about a folder's customisation, like
attribute column width (e.g. Name, Size, Type, etc.) and also additional
extended attributes that can be selected like Author, Comments, etc.
Does anyone know where this information is kept? Is it in the registry or
somewhere else? Alternatively can someone point me to any resource on the
net where I can find this information?
In a folder, when you select View -> Customise This Folder... you get a list of additional extended file attributes you can select from, for display purposes. Does anyone know where this list is comming from. Is it a static list defined in a DLL or is it read from the registry. Can the list of attributes be customised to display more attributes (e.g. JPG files have more extended attributes like Source, Rating, etc.). I am looking for a method of displaying these extended attributes. Does anyone know how this is or can be done?
I understand how to customise a folder through desktop.ini and .htt files.
What I am looking for is a simple method of exposing these extended
attributes by simply displaying them as extra columns in a folder.
Alternatively if anyone can tell me how they can be exposed through a
programmatic method (e.g. to get all the attributes just use the command
FileList.Folder.GetDetailsOf(FileList.SelectedItems.Item(0),i) where i = 0
to 40). But how do you display the additional attributes of .JPG files?
Any help would be appreciated. I have searched all known sources and have posted messages on several newsgroups but had ziltch info and help so far.
Thanks
Vangelis Vorgias
YASA (Yet Another Systems Architect)
|
|
|
|
|
It should exists the following file: "folder.htt" on every folder you customized. (That's on Windows 2000, on my computer I succeeded to find it only in Program Files).
Check out some Dino Esposito articles, he's the web/script guy for Explorer (and not only). MSDN (online or not), MSJ ... see what you can find.
Sardaukar
|
|
|
|
|
Every time I create a new file by choosing New from the context menu that appears
when right-clicking on an empty spot on the desktop, the word "new" is added to
the beginning of the file name. Is there any way to change this behavior?
Ex. When you select New>Text Document you create a text file named "New Text
Document.txt". I don't want the word "New" to appear in the file name, I just
want the file name to be "Text Document.txt".
Thanks for any suggestions.
|
|
|
|
|
You have to text edit your .RC file and search for "New Text Document.txt" and then just remove new.
-Matt Newman
|
|
|
|