Page 1 of 1
MB/s scope grab MS Win
Posted: Fri Jul 15, 2022 5:50 pm
by Simo_na
Hello
During the operations of file copy carried by MS Windows 10/11 OS is possible to capture the MB/S scope in real time ? if yes ...how do it ?

Re: MB/s scope grab MS Win
Posted: Fri Jul 15, 2022 6:38 pm
by Mijikai
Try to locate the window control that is responsible for the text you may be able to read it by sending a #WM_GETTEXT message.
Re: MB/s scope grab MS Win
Posted: Fri Jul 15, 2022 8:21 pm
by Simo_na
I understand what you mean...about...
Find ID of 'copy window'
and then request the 64K
converting the pointer buffer to unicode...
right ?
I thought there was something more immediate way...
Thank you
Re: MB/s scope grab MS Win
Posted: Fri Jul 15, 2022 9:44 pm
by Mijikai
With window/message functions like FindWindow_(), FindWindowEx_(), EnumWindows_(), SendMessage_(), ...
I dont have an example but you would need to go through all windows/controls and see if it is stored somewhere.
You could also look for it in memory but that is even more complicated.
The easy solution would be to code a custom copy routine and expose what you need.
Re: MB/s scope grab MS Win
Posted: Sat Jul 16, 2022 2:03 am
by BarryG
You won't be able to use #WM_GETTEXT or FindWindow_() with it, because it's not a standard window. I note that WinSpy says the class name for the progress display is "RateChartOverlayWindow", and it seems to be generated on-the-fly. See screenshot below.
However, you
can get the speed by doing the math yourself: the window title shows the % complete, so you just repeatedly test this percentage over one second of time and the file's size. The difference would be the MB/s of progress, which would match the speed in the overlay. Just don't ask me how to do the math, lol. I may try when I have some spare time and motivation, if nobody else does it.

Re: MB/s scope grab MS Win
Posted: Sat Jul 16, 2022 7:47 am
by Mijikai
It is a standard window and FindWindow_() works!?
The only problem is that the contend of "RateChartOverlayWindow" is drawn, there is just no child window/control holding the MB/s value itself.
On the other hand you can read out the progressbar "msctls_progress32" just fine so no need to read the window title.
Re: MB/s scope grab MS Win
Posted: Sat Jul 16, 2022 9:48 am
by BarryG
I meant that "RateChartOverlayWindow" isn't a standard window (or child window) that can be read with #WM_SETTEXT and FindWindow_().
Re: MB/s scope grab MS Win
Posted: Sat Jul 16, 2022 10:03 am
by Mijikai
It is a normal window that is registered in the system and can be located through FindWindowEx_() and other window functions.
If there is no text associated with the window #WM_GETTEXT will return nothing.
Re: MB/s scope grab MS Win
Posted: Sat Jul 16, 2022 10:30 am
by BarryG
You're preaching to the choir... that's what I'm saying (or mean). That the text isn't found using #WM_GETTEXT with a window handle, because it's not a standard window with text to be read. It's drawn.
Re: MB/s scope grab MS Win
Posted: Sat Jul 16, 2022 10:46 am
by Simo_na
I thought there was a pointer where peek the value.
i didn't know WinSpy. Thank you
since in my opinion it is a very reliable calculation.
I am trying to write a simple 'backup' application and I would have liked to use it value since using the #FO_COPY...
Re: MB/s scope grab MS Win
Posted: Sat Jul 16, 2022 12:15 pm
by Bitblazer
Or use brute force -
https://www.purebasic.fr/english/viewtopic.php?t=77835 
But i follow this topic to see which better way is found by the windows experts here.
Re: MB/s scope grab MS Win
Posted: Sun Jul 24, 2022 1:25 pm
by breeze4me
It is possible to read the information, but the update interval is about 10 seconds, so it seems useless.
See the post.
https://www.purebasic.fr/english/viewtopic.php?t=79544