A common misconception about Task Manager numbers is that they tell something about the memory your program is consuming. This is not what those numbers tell you. They tell you the amount of address space that is in use. This has nothing to do with the amount of that address space your program is actually using. The blocks of memory that your code, or the library, freed are still in the address space, but they are available for subsequent allocation. The numbers you see in Task Manager are almost but not quite completely useless for telling how much of your memory is in use. If you see it shrink, this is good, but if you don't, it is not necessarily bad. If it's really important to you, use the heap-walking functions to track what is going on.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
As already noted, there is no relation between the mapping of the library into the address space of your process and the memory allocated by your threads.
LoadLibrary works per process, not per thread. So you add can add a HINSTANCE member variable to your class, load the library from within the constructor or your Start() function, and free the library in the destructor.
+ Why do we use Sleep() function (or timer) when we are processing audio/video samples.
+ If we are rendering a video where our frame rate is 29 fps, then what value should be passed to the Sleep() function?
+ Is this what is known as Latency?
I may have wrongly used the term processing. I am actually displaying the video frames (frame rate = 29.97 fps) onto a dialog. Now when I didn't use Sleep(), the 18 second video completed in just 4-5 seconds. But after putting Sleep(25), it almost runs normally. What does this mean to you?
Can you post your code ?
You have to time your rendering, which is what you are doing in an awkward way with the Sleep instruction. If your target rate is 30 fps, you have to exactly wait 33ms between displaying each frame (which is obtained more or less with your Sleep(25)), but you don't use the Sleep instruction for that !
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Entropy isn't what is used to.
I am trying to get data from grid of external application. I tried WM_GETTEXT on grid control which is a child window. But SendMessage() returns blank value. How can I get data from grid. I can see its class from Spy++ as "Txt Grid Control" without any caption.
Is there any way I can get text of this grid control.
You cannot use WM_GETTEXT to get the content of a composite control. You need to find a way to iterate through all the child controls of the grid to access the content of each. And even then it will depend largely on the control's internal implementation whether you can actually get access to the data.
GetLastError shows 6, ie. invalid handle. But when i call method again after failure occurs, its works fine
I have workarounds for the problem. But I am curious to know the reason. why its happened only some times even if dialog have region.
Thanks in advance
I'm currently playing around with the Log component of the Boost C++ library. I searched for a DB backend, found nothing but "Does anyone know if Boost::Log can write into a DB?", and hoping that someone on here can answer me that one: Does anyone know if Boost::Log can write into a DB?
The scariest moment is always just before the Start - Stephen King Die Frauen warten auf die Liebe, und die Männer warten auf die Frauen - Wolf Wondratschek
You're not installing a mouse hook.
Rather, you're installing a CallWndProc hook.
From this hook proc, you're trying to get the pointer Id from WPARAM.
The documentation of CallWndProc[^] says - Type: WPARAM
Specifies whether the message was sent by the current thread. If the message was sent by the current thread, it is nonzero; otherwise, it is zero.