|
Make sure you build all the dll's in Debug. Run you application in Debug (inside the studio). Exit your application (when you know that the leaks (or suspected leaks occurre)). Open the output pane window, click the "Debug" tab, then go to the bottom. If there are memory leaks (that VS can find) they will be listed. Then if you double click on the source file, it will take you to where the item was created and then not released.
Again, I am assuming that you have done all this.
Larry
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
Yes, I have done it all.
The point is that I DO see a HUGE list of memory leaks, I have a slight idea from which DLL and even class they come, but it wont give out any source files and/or lines. Only dumps objects...
|
|
|
|
|
Now I'm confused. I have several projects that I check that are built (the whole project including the dll's) and when there is a leak, it will give me the file/line of the offending object even if it is in the dll!
When you compile your project, is the dll a dependency(sp) of the main project?
Larry
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
No, they're not dependencies. We have multiple actual programs which use the same shared DLLs, so the DLLs are mostly standalone projects alltogether.
You think I can trace the leaks when I include the DLLs in question in the workspace of my project?
|
|
|
|
|
Yep I do. I thought you were already doing that. Do you know how to make them a dependancy? I'm assuming yes.
Larry
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
I guess just adding them to the workspace will do the trick, no?
If not, then please tell me
- Fahr
|
|
|
|
|
Yes. But you have to make sure that the main exe project depends upon these dll's. This is done by: In the File View, right click on the "Workspace", Select "Insert Project into Workspace", when the dialog comes up, select the project to insert (the DLL in question), then check the "Dependency of" and select the main exe. When finished, make sure that you have "Debug" selected as the build and do a "Build All". This will compile the files for the DLL and your exe that uses them. Run the puppy and see what happens.
Larry
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
Ok, I will try this when I'm back at work tomorrow
Thanks a lot for the info, I'll let you know how it ended
- Fahr
|
|
|
|
|
Any luck?
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
eh, sorry, forgot to reply... it all worked out fine
Mem leaks found and resolved, thanks a lot for the tip!
|
|
|
|
|
i am new to visual C++, need to create an SDI where I have a view frame for 3D visualization and another frame where i have all the controls such as buttons, listboxes. How do i do this?
|
|
|
|
|
Look at the 'Splitter windows' articles in the 'MFC controls' section. You'll find some interesting articles!
|
|
|
|
|
Hi,
I want to add a button on title bar..just previous to close button and add some functionality to it..can i do that first of all..and if i can then can you show me some pointers or path or tutorials to do it..I need it urgently..Please reply..Thanks in advance for the help..
Himanshu
|
|
|
|
|
You should be able to simulate a button on the title bar simply by positioning it with MoveWindow.
|
|
|
|
|
Why toolbar is drawn in window created by CreateEx() -
not LoadFrame() like CMainFrame,
shows only CView-like toolbar -
it under flat level menu of window?
And CView size must take toolbar size into account in
client area in OnSize() ?
<br />
hr = m_PAlarmWnd-><br />
CreateEx(<br />
NULL|WS_EX_CLIENTEDGE ,
NULL,(LPCTSTR)strHeading<br />
,WS_VISIBLE |WS_CAPTION|WS_POPUP|
WS_SYSMENU| WS_THICKFRAME| WS_MINIMIZEBOX| WS_MAXIMIZEBOX <br />
,0,0,900,600, <br />
pParent->GetSafeHwnd(),<br />
pMenu->GetSafeHmenu()
,0);<br />
____
why also
do not displays tooltips,
but if to do not insert style TBSTYLE_FLAT
tooltip appears ?
|
|
|
|
|
Hello!
I'll try to explain my problem as precise as possible.
Imagine I have several charts on the screen that displays some signals. I want to let the user calibrate them when he wants. So, I open a dialog in wich he can enter the data for the calibration of the signal.
Up to here, no problems. But I want the signals to be active in background! So I need this dialog to be in a indepedant thread. But this give me a Debug Assertion Fault.
Here is my code:
DWORD WINAPI CalibrateThreadProc( LPVOID pParam )
{
CCalibrateDlg* pCalDlg = new CCalibrateDlg;
pCalDlg->DoModal();
return 0;
}
void CMonitoringDoc::OnCalibrate()
{
DWORD ThreadID;
HANDLE m_pCalibThread = CreateThread(
NULL,
0,
CalibrateThreadProc,
this,
0,
&ThreadID);
}
What is the problem ?? I don't pass any C++ object through the thread (or I don't use it).
Thanks
|
|
|
|
|
Sorry, I never think about modeless dialogs
|
|
|
|
|
You haven't said where the ASSERT is occuring, but I assume it is in pCalDlg->DoModal();
I'd suggest forgetting the thread and using a modeless dialog, which will be a lot simpler. If you want to persist with the thread then you need to derive a class from CWinThread. Read up on UI threads vs. Worker threads.
I use modal dialogs in threads in ED (see sig) which appear as modeless dialogs as far as the user is concerned. The various Find dialogs work this way. It is a fair bit of work though to get everything working properly.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Hello!
Yeap, that's what I'm doing now (see my previous post) and that works just fine!
Thanks
|
|
|
|
|
Hi,
I want write a SQL to insert records into my table(The table has
a large amounts of fields,more than 100).
The SQL is a CString, but it is too big and exceeds the
maxium length of a CString. Please help me how can I
create a string with any huge length? Code examples would
be more appreciated.Or any other method?
Thanks a lot.
wang
wang
|
|
|
|
|
|
Thats a good advice indeed
MS
|
|
|
|
|
How about you create a CString for every row in the table instead!
Then you can use CStringArray
|
|
|
|
|
Since it's quite difficult to write a 2GB query(!), I guess you are writing something like
CString SQLString (a string longer than 2048 chars);
If this is your code, there is not a problem related to CString, but it is a limit of the compiler: in vc6 a string cannot be longer than 2048 characters.
So, you could simply try
CString SQLString;
SQLString="First part of query smaller than 2048";
SQLString+="Second part of query";
and so on...,
|
|
|
|
|
Hi, guys:
I've developed a dll which need several other dll's. It's OK when I "regsvr32 mydll.dll" and it works perfectly. But, the releaseminsize version give me "LoadLibrary(mydll.dll) failed - unspecified error".
What's wrong with the releaseminsize version ? How can I get it working?
TIA
-gusd
|
|
|
|