|
T1TAN wrote: LogicalDisk|PhysicalDisk\Disk Bytes/sec
It would look something like:
HQUERY hQuery = NULL;
PDH_STATUS pdhStatus = PdhOpenQuery(NULL, 0, &hQuery);
PDH_COUNTER_PATH_ELEMENTS pdhCpe;
pdhCpe.szMachineName = TEXT("server");
pdhCpe.szObjectName = TEXT("LogicalDisk");
pdhCpe.szInstanceName = TEXT("C:");
pdhCpe.szParentInstance = NULL;
pdhCpe.dwInstanceIndex = -1;
pdhCpe.szCounterName = TEXT("Disk Bytes/sec");
DWORD dwBufferSize = sizeof(szBytesSec);
TCHAR szBytesSec[128];
pdhStatus = PdhMakeCounterPath(&pdhCpe, szBytesSec, &dwBufferSize, 0);
HCOUNTER hBytesSec;
pdhStatus = PdhAddCounter(hQuery, szBytesSec, 0, &hBytesSec);
pdhStatus = PdhCollectQueryData(hQuery);
PDH_FMT_COUNTERVALUE pdhfmtBytesSec;
pdhStatus = PdhGetFormattedCounterValue(hBytesSec, PDH_FMT_LONG, NULL, &pdhfmtBytesSec);
pdhStatus = PdhCloseQuery(hQuery);
"Take only what you need and leave the land as you found it." - Native American Proverb
-- modified at 9:28 Monday 12th December, 2005
|
|
|
|
|
Thanx! Will give it a try and let you know how it worked
Do you think I could use this code with CPerfCounters class located in this[^] article?
Is there a way to get the maximum bytes per sec?? I would like to get the percentage of max disk throughput if possible
thanx again DC
---
http://sprdsoft.cmar-net.org - We Sprd You Softly
Our site features contents and several images. All of this is very weird.
In the end, war is not about who's right, it's about who's left.
|
|
|
|
|
T1TAN wrote: Do you think I could use this code with CPerfCounters class located in this[^] article?
Not sure. How about asking the article's author?
T1TAN wrote: Is there a way to get the maximum bytes per sec??
Sure. Each time the value is obtained, store the highest value in a separate variable.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Not sure. How about asking the article's author?
Em, yeah..that seems like a good idea..
DavidCrow wrote: Sure. Each time the value is obtained, store the highest value in a separate variable.
Oh I didn't mean that highest value, what I meant was: is there a way to get the maximum throughput that could ever happen on a specific drive? Not the highest one I've ever measured. I'm not really sure this is possible. I suppose each drive has its own throughput limit..
---
http://sprdsoft.cmar-net.org - We Sprd You Softly
Our site features contents and several images. All of this is very weird.
In the end, war is not about who's right, it's about who's left.
|
|
|
|
|
Hi,
I'm writing a TAPI App. I listen the line, take the phone, Play a sound, process DTMF (key tones the user presses).
If user selects 0 it is (s)he wants to talk to an operator(human kind! operator).
How to do that?
Any link, article, short description or a single word would be helpfull and appreciated. Thank you very much.
//This is not a signature
while (I'm_alive) {
printf("I Love Programming");
}
|
|
|
|
|
Hi,
I know here's not a good place for a message like this, but I thought it might be fun while your working very hard
http://liw.iki.fi/liw/texts/programming-truths.html[^]
//This is not a signature
while (I'm_alive) {
printf("I Love Programming");
}
-- modified at 15:40 Saturday 10th December, 2005
|
|
|
|
|
|
Half of software based only on probability :P
|
|
|
|
|
|
There's some really hidden irony there which I cannot find.
|
|
|
|
|
*cough*
NONE ARE TRUE
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hello,
I think that you would have gotten better reactions when you posted this in the lounge..
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
You're absolutely true!
I thought it would be fun, I never thought people will be angry
They say this is not true or that on!! while I think most of it is just joke
and probably not true(nearly all of it!).
Anyway, this was the last time, I promise.
//This is not a signature
while (I'm_alive) {
printf("I Love Programming");
}
|
|
|
|
|
I think that they got angry at themselves because the wasted precious time looking for a solution for one of their problems. I think that you should ignore these reactions and next time look for a better audiance that is looking for wasting their precious time.
Hamed Mosavi wrote: I thought it would be fun
I thought that it was kinda fun to read. I knew some of it already and it didn't make me rofl or something. I think that the web would be a lesser place without people like you. Keep posting!
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Thank you
Very informative and encouraging.
At least I learned something,. Much better than those 'mad' and 'unwell' smilies(!) from others.
Thank you
//This is not a signature
while (I'm_alive) {
printf("I Love Programming");
}
|
|
|
|
|
|
|
As far as a tutorial goes, there is not much difference. Instead of using depth in perspective, you use layers for 2D games and build up from there. Your background layer is a long multi-texture graphic, usually sectioned for culling efficiency. You build on top of that your objects. In an orthographic projection, covered in most 3D tutorials all layers are equisized, no perspective shrinking, so you use the depth buffer only for layering. But all in all it is really not that different from 3D games, consider it a top down only view of a 3D game, and all the tutorials will pretty much work even if they are in 3D.
Some 2D engines to make your life easier:
http://www.phelios.com/ptk/[^]
http://goldenstudios.or.id/products/GTGE/index.php[^]
otherwise, as I said, put the projection in orthographic, and use a 3D engine/tutorial.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
|
Kixdemp wrote: Oh... alright... but do you know of a short, simple tutorial? http://www.gamedev.net/nehe[^] seems far too long... Thanks!
Actually, Nehe is the best tutorial I know of. You can skip those items that seem obvious, or go it one step at a time as needed.
But maybe one of these will be more what you want: http://www.opengl.org/resources/tutorials/[^]
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Hi,
I am working on a property page that holds 2 edit controls and a confirm button.
These controls are programmed to enter data quit fast by the user, eg
I overwrote PreTranslateMessage of the property page, so that when the user hits the enter key in one of these 3 controls, it shifts the focus to the next of these 3 controls and that in a circular way. My problem is that when one of the edit controls gets the focus the OK button on the property sheet gets highlighted indicating that it is the default button which it is not at that point, since the enter key will result in shift to one of my controls. How can I prevent this from happening ?
Thx
|
|
|
|
|
I am drawing some realtime graph using a Dialog based application, which I'm building using MFC. I'm using CDC function Moveto()/LineTo() to draw the graph and Grids. I am directly drwing to the DC of a Picture control in the Dialog. I am using Invalidate() - with both true/false option - to refresh the screen. Then I've used CToolTipCtrl class to show the value of the graph when a user place the mouse at a perticular position. To implement this I have divided the graph area in several rectangle along the x-axis, and added those using AddTool() function.
Now the tool tips are coming for each pixel - but when I move the mouse from one pixel to anther I am faceing lots of 'flickerings' in the screen. What is the reason for that. What is the way to reduce the screen flickerings.
One of my colleagues said that if I'd better draw to a Memory DC, and then use BitBlt() to draw in the screen, then I'd get no screen flickerings, - is it true ? - if yes then why???
Please help,
Sanjoy Sinharoy
Software Enggineer
HCL Technologies
India
|
|
|
|
|
Have you tried WS_CLIPCHILDREN (Clip Children property in the designer)?
When I draw something that needs to be flicker free, I usually use a backbuffer bitmap, to which I connect a memory dc. I then paint to the memory dc, and blit it wherever I want it shown. I also make sure I don't let the background in the picture area to be redrawn, because that's the root of all evil flickering.
The general solution I apply is to create a new window class, and call it Canvas or something like that. In its WM_ERASEBKGND handler, I don't do anything. I just return TRUE to signal that the background has been erased. I then set the WS_CLIPCHILDREN style on its parent. The window class maintain the backbuffer bitmap and memory dc, which is used for drawing operations. Whenever the control needs to redraw itself in the WM_PAINT handler, I just blit the bitmap to the window dc. No flickering... (and also reusable!)
--
Pictures[^] from my Japan trip.
|
|
|
|
|
Hi,
Does the CString has a max character limit ? Because i can not save to the member variables of CString type very big SQL queries (about 500 characters long).
Any suggestion ?
sdancer
|
|
|
|
|
sdancer75 wrote: Does the CString has a max character limit ? Because i can not save to the member variables of CString type very big SQL queries (about 500 characters long).
Any suggestion ?
CString has limits but it certainly isn't limited to 500 characters. How are you saving your query into the CString?
Michael
CP Blog [^] Development Blog [^]
|
|
|
|