For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
Given that those platforms have very different operating systems and hardware it is unlikely that you will find a library that can handle each type, especially at the hardware level. If you want open source code then Google should be your search tool.
This application is working fine on 2003 R2 and 2000 Servers and even our other 2008 R2 server but I keep getting the error on this new server. I could have sworn I had to do some tweak to get it working on 2008 R2 but I can't remember what it was. Basically what is happening is the application is doing a DB "query" that is taking a fair amount of time and as a result the UI is no longer "responding" even though the applicaion is working away and in fact not frozen/locked/in an infinite loop. The application is written in VS 6 and as you can see in both the description and below using MFC.
That is correct, it is however working "fine" on the other 2008 R2 Server. The window grays out and has "not responding" in the ribbon, but it still carries on and completes. However on this server it quits.
for(int = 0; i<size; i++)
CWinThread * pWinThread = AfxBeginThread(MyThreadFunction, this);
UINT __cdecl MyThreadFunction(LPVOID pParam)
CMainClass *pArg = (CMainClass*) pParam;
pArg->GetList(); // I need a method in the CMainClass
HINSTANCE hLibrary = LoadLibrary(L"winhttp.dll");
// Call some winhttp.dll functions.
My problem is that despite the call to FreeLibrary(), winhttp.dll is not unloaded. Each new thread I create allocate memory in the heap, but the call to FreeLibrary() does not release that memory.
Is there a way to force the unloading of the library and the release of the memory?
I'm not sure I understand your question...
I have no memory leaks and I see the memory usage increasing at every new created thread. So I presume that the "per-thread" heap memory is not released by the call to FreeLibrary().
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.
Last Visit: 31-Dec-99 18:00 Last Update: 14-Mar-14 5:19