|
Yes, if that is when the copying begins.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hello,
I want to know if there is a WinAPI call ( or some other mechanism ) for getting the CPU and memory usage information from the system? The ideal solution would be to get the above information on a per process basis. Could somebody help me out????
Thanks & Regards,
Gautam.
|
|
|
|
|
Not sure about CPU usage but I believe you can get memory usage via PSAPI (on NT).
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/perfmon/base/using_psapi.asp
Hope that helps.
Matt
|
|
|
|
|
|
I like that second paragraph:
Although you use the registry to collect performance data, the data is not stored in the registry database. Instead, accessing the registry with this key causes the system to collect the data from the appropriate system object managers.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
|
Dudi Avramov wrote:
I wrote How to get CPU usage by performance counters (without PDH)
which applies to Windows NT, Win2K/XP.
Ok, and?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Well, my reply was attented Gautamcode who asked for API that returns CPU usage.
|
|
|
|
|
Hey Dudi,
Thanks for your help.
Best Regards,
Gautam.
|
|
|
|
|
So I'm trying to learn DirectX and got a book to do so ( pause here for laughter ) but I'm having a bit of trouble. The book teaches DX 8.1 and requires VC .NET 2002. I've got .NET 2003 and keep getting link errors saying some library can't be opened. A quick search of my HDD showed that it's there where it ought to be and I can open it fine. My include directories, library dependencies are set correctly, and the DX 8.1 SDK is installed to default paths. Even when I open the solutions directly from the indluded CD I get the same link errors. Is there some discrepancy between 2002 & 2003 or is it something else?
Always Fear the Man with Nothing to Lose
Jeryth
|
|
|
|
|
Hi,
you got only one chance left. Contact the Microsoft people. They should know.
However, there are some updates on the msdn.com site.
May be these patches work.
|
|
|
|
|
Specifics of the error: LNK1104: cannot open file "libci.lib"
Any ideas?
Always Fear the Man with Nothing to Lose
Jeryth
|
|
|
|
|
Hmm, I'm replying more to my own question.
I have found the problem, the libci,lib file is in the wrong spot somehow. I think it might have something to do with having VS 6.0 installed simultaneously w/ .NET I moved the library to a different folder and explicity listed that dir as an additional lib folder and the lining went fine. Could any of you do a search and find where the library is on your machines? Thanks.
Always Fear the Man with Nothing to Lose
Jeryth
|
|
|
|
|
The library member, <bitset> allows one to do the following:
cout<<bitset<8>('A') <<endl; and see the binary representation of "A" displayed.
It doesn't look as though the library offers a means to reverse the transformation, where if you were to give the binary representation, you'd get back the ASCII equivalent.
Does anyone know of such a way?
Thanks for any suggestion.
William
Fortes in fide et opere!
|
|
|
|
|
If you begin with a bitset class, you can use bitset::to_ulong and then cast the ulong as a char for display.
|
|
|
|
|
Thanks for replying. Your suggestion worked very well.
Thanks!
William
Fortes in fide et opere!
|
|
|
|
|
Hi,
there is a function called to_ulong() defined in the bitset header file which is the counterfunction to to_string() which turns a string into a binary value.
Hope it helps.
Regards.
Alex
|
|
|
|
|
Thanks for replying.
An earlier response has already pointed me in the right direction which wasn't too far from what your suggestion offered.
I knew of "to_ulong()" and have used it several times before, but it only seemed to take the binary representation and return its numeric equivalent, not an alphabetic value if the binary representation it was given, were for such a value.
Thanks anyway for replying. I appreciate it.
William
Fortes in fide et opere!
|
|
|
|
|
Hi
I have a modeless Dialog in my MDI App and now when you click on a button, the modeless dialog should give the view value. but that didnt work.
how can I realize this?
thx
|
|
|
|
|
I wrote an application that directly communicates with external equipment via RS-232 and the like. It also communicates to the sound card as well. Originally the program was written in VB/VC++. I just finished porting the major sections of the program to C# and now it's slow as slow can be.
The calls to the external equipment are made using PInvoke to directly call the Win32API. In an effort to speed things up, I'm removing the PInvoke code and replacing it with MC++.
However, when I try to call regular C-style DLL files I get a linker error LINK2001 with a mangled version of the original function.
The top of the header file has EXTERN "C."
My question is: what else can cause this? I'm pretty sure it's a simple fix, but don't know if the MC++ settings are significantly different than the VC++ 6.0.
|
|
|
|
|
Is there any way to get SpinBox Up state?
Thanks in Advanced
Shin
|
|
|
|
|
I was talking the ButtonUp Event for SpinBox.
Shin
|
|
|
|
|
Assuming you want to know when the Up part of the spin box control has been clicked, the control sends a WM_NOTIFY message with the UDN_DELTAPOS code to its parent window.
|
|
|
|
|
I have an Dialog based project and if I try to add a windows messgaehandler for WM_GETMINMAXINFO, I have to change the filter from dialog to window in order to have that message available in the list. Is this ok? What is the reason for this?
Thanks,
ns
|
|
|
|
|
Hi ns,
You're doing fine. This filter is just an Visual Studio UI thing designed to minimize the number of handlers the programmer is exposed to, so that only the most commonly used are displayed. Sometimes it happens (as in your case) that you go nuts looking for that handler and it appears nowhere. IMHO the filter thing does more harm than good, and it's badly implemented (it appears in a different tab than where its effect is apparent.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|