rayofunreal
asked on
Get thread times under WIN95 ?
Hi there....
I need to know how % of power have each thread in my process. In WIN NT is function like GetThreadTimes, but under 95 it's not implemented. Please, I need it fast, I have no time for experiments... Can somebody helps me ? I'm using VC++ 5.0 without MFC....
Thanx, Ray
ps:sorry for ugly english
I need to know how % of power have each thread in my process. In WIN NT is function like GetThreadTimes, but under 95 it's not implemented. Please, I need it fast, I have no time for experiments... Can somebody helps me ? I'm using VC++ 5.0 without MFC....
Thanx, Ray
ps:sorry for ugly english
ASKER
Ops... Thanx... But I need to INCLUDE code in MY program.... I wont to do something like this:
CPU:40%
Understand ? Thanx :-))
have a nice day,
Ray
CPU:40%
Understand ? Thanx :-))
have a nice day,
Ray
Sorry, as far as I can tell there is no equivalent API function for Windows 95. Every reference that I look in specify that the thread object and associated libary functions are for the most part WinNT only.
Tom
Tom
ASKER
I know.... But WinTop CAN show CPU times, so THERE MUST BE some way.... But I have no time for it :-( I know that it is based in timers (?)....
It isn't based in timers. It's information that's available only from kernel-level calls in Win95, and that means you need to use a device driver to get the information. (Examine WinTop more carefully, and you'll see that's what it's doing.)
.B ekiM
.B ekiM
ASKER
Do you know which functions ? And which headers etc. ? I examine WinTop only for imported functions... I didn't find any which I don't know... :-(
Thanx, Ray
Thanx, Ray
ASKER
WinTop used his own VxD....
ASKER
Adjusted points to 450
Try posting this in the proper area ( Programming C++ ) and you might get better results ...
Actually, the proper area would be the Windows programming area; this isn't a generic C++ question.
B ekiM
B ekiM
ASKER
Ok :-)
I sent email to a good friend of mine and I belive he can help us... Waiting for reply..
Damir
Damir
ASKER
Thanx :-)
ASKER
Dear Damit, did you forgot ?
Nope... still got no reply... I'll have to ask him again... he's busy man..
Damir
Damir
Can you pls tell me what you want to do. Is a simple profiling (which many compilers are able to do) enough for your problem.
ASKER
We're developing MOD/XM/IT/MPEG.... player, and I want to display how much percent of CPU time decoding have. Simple profiling (al thread in process, or single thread...).
Thanx !
Thanx !
Dear rbr, locking a question without providing an answer is not considered professional behavior.
ASKER
:-)
I know, but I need answer... I really don't know how to do this under WIN95.... And I need it... :-(
Thanx for helping !
I know, but I need answer... I really don't know how to do this under WIN95.... And I need it... :-(
Thanx for helping !
You'll need a device driver to accomplish the functionality of GetThreadTimes under Win95.
See:
http://www.dejanews.com/getdoc.xp?AN=227104610
See:
http://www.dejanews.com/getdoc.xp?AN=227104610
ASKER
I know, but there are some progs, which can do it WITHOUT VxD (Pulse,ModPlug,Mod4Win)... ..
Why don't you email the authors of such programs?
ASKER
They (Edited by Computer101) me.... :-)
ASKER
Sorry, I forgot on me ?
The win95 system is not a multiprocess system.
The execute program is use by the win95 cpu for 100% process time.
If you want to know how many % time your program used.
You should close all other program and use the system resorce table .
The execute program is use by the win95 cpu for 100% process time.
If you want to know how many % time your program used.
You should close all other program and use the system resorce table .
try suing performance data helper(pdh).see vc help.
ASKER
I tried... There is only sentense like this: Windows 95 did't sotring threads time... :-(
Do you need to find the individual load for each thread or the overall processor loading (like in system monitor). The overall loading is possible from VB, I have done it, for individual thread loading alla NT task manager I am not even sure the win95 kernel has this info.
Ray, Download
DllShow.Zip
[File Dependencies, Printout and Excellent Resource Meter.]
See and download at http://www.execpc.com/~sbd/ OR http://www.execpc.com/~sbd/DLLShow.html
DLL Show for Windows 95 is a small utility that displays a list of all tasks and processes currently
running on your MS Windows 95 system.
I like it better than Norton Utilities Resource meter.
It shows how much ram is used, when ram is used up it shows where your
swapfile takes over and how much free. and GDI.
lemme know what you think.
Bud
DllShow.Zip
[File Dependencies, Printout and Excellent Resource Meter.]
See and download at http://www.execpc.com/~sbd/ OR http://www.execpc.com/~sbd/DLLShow.html
DLL Show for Windows 95 is a small utility that displays a list of all tasks and processes currently
running on your MS Windows 95 system.
I like it better than Norton Utilities Resource meter.
It shows how much ram is used, when ram is used up it shows where your
swapfile takes over and how much free. and GDI.
lemme know what you think.
Bud
Damir,
are you getting my email messages??
Bud
are you getting my email messages??
Bud
Received one so far Bud..
Damir
P.S. This problem seems more like programming section problem.. I hope guys over there know the solution.
Damir
P.S. This problem seems more like programming section problem.. I hope guys over there know the solution.
I found something!
There was a mag article a year or two ago about a cycle counter for w95 called vcycle.vxd.
I think it was a Dr Dobbs Journal. I'm searching their source dbase right now. IF you wish you can try to locate it yourself (I hope I'll find it by tomorow)
http://www.ddj.com/ftp/
Search for vcycle or something simmilar..
There was a guy from Russia who said he'll send me his vxd only he had to solve few minor problems.. at least one will work..
Damir
There was a mag article a year or two ago about a cycle counter for w95 called vcycle.vxd.
I think it was a Dr Dobbs Journal. I'm searching their source dbase right now. IF you wish you can try to locate it yourself (I hope I'll find it by tomorow)
http://www.ddj.com/ftp/
Search for vcycle or something simmilar..
There was a guy from Russia who said he'll send me his vxd only he had to solve few minor problems.. at least one will work..
Damir
My friend from Russia said he'll send me the vxd but you will need to figure out how to obtain
ring 0 thread handle - that's a difficult part...
BTW look at this:
From "Advanced Windows" (p81) by Jeffery Richter;
"Unfortunately, the GetThreadTimes and GetProcessTimes functions are not
functional in Microsoft Windows 95. If you call either of these functions in
Windows 95, they return FALSE. A subsequent call to GetLastError returns a
value of 120 (ERROR_CALL_NOT_IMPLEMENTE D), which indicates that these
functions are only valid in Microsoft Windows NT."
"There is no reliable mechanism for an application to determine how much CPU
time a thread or process has used under Windows 95."
I hope we'll prove him wrong!
Damir
ring 0 thread handle - that's a difficult part...
BTW look at this:
From "Advanced Windows" (p81) by Jeffery Richter;
"Unfortunately, the GetThreadTimes and GetProcessTimes functions are not
functional in Microsoft Windows 95. If you call either of these functions in
Windows 95, they return FALSE. A subsequent call to GetLastError returns a
value of 120 (ERROR_CALL_NOT_IMPLEMENTE
functions are only valid in Microsoft Windows NT."
"There is no reliable mechanism for an application to determine how much CPU
time a thread or process has used under Windows 95."
I hope we'll prove him wrong!
Damir
ASKER
Thanx ! I'll try it in this moment :-)
I have book from J.Richter.... But there must be some way... I finished some problems under W95, about them he wrote the same :-)
I have book from J.Richter.... But there must be some way... I finished some problems under W95, about them he wrote the same :-)
have you tried microsoft kerneltoys, or powertoys... been awhile but i seem to remember the kernaltoys having features along this line...
ASKER
Yes, ofcourse.... But WinTop uses his OWN VxD, and there is nothing about using it....
Dear dpavusin, I treyed it, but I didn't found it... can you help me ?
Thanx !
Dear dpavusin, I treyed it, but I didn't found it... can you help me ?
Thanx !
Please unlock this question :)
Please unlock this question :)
I'm still looking for it..I tried to locate it but could not I sent them email asking for help in locating the source.. I think I'll have a vxd from my friend in Russia soon too so you can give it a shot if you figure out how to obtain ring 0 thread handle..
I'll try to find it again..I searched through 1997..it could be early 98 too..I'll look there too...
Damir
I'll try to find it again..I searched through 1997..it could be early 98 too..I'll look there too...
Damir
ASKER
Sorry... When you'll get it from yours Russian friend, I'll give my pts to you...
and Thanx !
and Thanx !
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can find the "Win32 Multithreading Performance" article there: http://premium.microsoft.com/msdn/library/techart/msdn_threadli.htm
Hey, where are you ? :)
ASKER
Sorry... I was on holidays... I'm here only for 1 day, I'll try it... sorry, holidays... I'll give you 650 pts...OK ? and sorry for waiting.... :-)
ASKER
Thanx !!!!!!!!!!!!!!
Regards,
Damir