|
Building a release build with debug info will not alter the way the application behaves. To turn on debug info for the release build follow these steps (VC6):
- Select the release configuration as the active config.
- Project settings, "C/C++" tab, "General" category: Select "Program Database" in the "Debug Info" combo.
- "Link" tab, "Debug" category: Tick "Debug info", "Microsoft format" & "Separate types".
- Rebuild.
If your workspace contains multiple projects follow the same steps for each one. Run the application in the debugger (still the release build however) and reproduce the problem. When the error dialog appears break in and look at the call stack. You may have to hunt for the correct thread.
Because optimizations are enabled your debugger will "lie" to you from time to time (when some optimization trips it up) so beware.
I actually always follow these steps for release builds. Having the .PDB files has many benefits such as simplifying postmortem analysis with crash dump files. In a production environment you should have a symbol server on the build machine and the .PDB files get added to the symbol server as part of the build process.
Steve
|
|
|
|
|
Hi,
Thanks for your reply..
This crash occurs only in release mode. It does not occur If I set the bebug information(i.e Link->GenerateDebugInfo settings ) in release mode. Moreover this does not reproduce in release mode always..It comes up some times only..i.e I don't have the steps for repeating this error. Hence I don't think it is problem with virtual function call. If it was a problem with virtual function call, I should be able to reproduce this error always in both debug and release builds ..right? Is there any other reason for this error message? Do my Link options of Project settings have any impact on this error? My link options are: CTS32D.LIB RTS32D.LIB TAPI32.LIB VERSION.LIB WINMM.LIB VFW32.LIB..
Please let me know if you have further inputs on this as I am not getting any clue for resolving this issue..
Is there any tool that can catch and take us to the code that is creating these runtime errors..
Thanks..
Madhavi..
|
|
|
|
|
Hi All,
I would like to know whether DiectX 9 supports vc++6? Moreover I'd also like to know the best books available in the market for DirectX9.
Thanks in Advance
Rajeev
|
|
|
|
|
i need a simple doc/view architecure
example,
just want to clear up fundamental
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
This is something you can find without any problem in the MSDN.
~RaGE();
|
|
|
|
|
Yeh i had refered one good book but
its not with me right now , any way
will find it from net.
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
|
How to get a pointer of a specific child frame window in a MDI application if I have open more child frame windows?
sude
|
|
|
|
|
There are multiple way to achieve this. Enumerate all windows and check with CWnd::IsChild , use CWnd::GetWindow with parameter GW_CHILD, use CWnd::FindWindow , this will all depend on the criteria that makes the child window you search different from the others (the name, the ID, ...)
~RaGE();
|
|
|
|
|
First of all, thank you for reading this message.
As a novince, what I have seen so far is to put a button into a dialog, and it will stay at that position staticly. Now if I resize the window, the button is still there..
Could you please tell me or explain to me what method i need to approach to move the button (in the same way that DOCK in C# works)
Thank you.
Elapid For The Win
|
|
|
|
|
MoveWindow or SetWindowPos apis will do that.
-Prakash
|
|
|
|
|
In addition with Mr.Prakash, I would suggest you to use this[^] class.
It will be useful to you, if you decide to move other controls as well.
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
Hi,
I am using SECDialogBar class inside mainframe.cpp , during my application exit and startup my dialogbar settings are getting written into .ini file. the standard framework is providing this by default, Is there a way to prevent it from reading and writing into ini file ? I want this behaviour for all dialogbars in the application except one, for this one dialogbar I want to control writing into ini file.
If you have any idea please let me know asap.
Krishna
|
|
|
|
|
Hi ,
I am using WinHelp2000 for dislaying Help on my application in VC++.
The help is displayed based on the language my application is being executed.
Lets say I can run my application in English and Italian.
The appropriate help file is loaded when i start the application, based on the language selected.
Now the problem is if I do not have help on a specific topic in Italian,then I should be able to display help on that topic in English.
If anyone knows a solution to this ,kindly help me.
Thanks,
Gayathri.
|
|
|
|
|
I am pretty sure if you call WinHelp, that you can detect if the requested topic was located. If not located, then open the OTHER help file and try to get the topic again. Default implementations of WinHelp calls typically do very little, if any, checking on the return status values of the function calls.
Marriage slows down your coding, a baby slows it down even more!
|
|
|
|
|
Hi ,
The problem itself is that though I am able to call Winhelp,I am not able to detect if the requested topic has been located or not.
WinHelp returns a value of TRUE even if it doesnt detect a topic and this is where I am stuck up.
If I can resolve this ,my problem is solved.
The Code snippet I am using is
::WinHelp(HWnd, HelpFilePath, HELP_CONTEXT, HelpTopic );
Thanks,
Gayathri
|
|
|
|
|
Typical MS BS
I did some experimentation, and indeed I observed the 'success' return value for an invalid topic - but no help window appeared whatsoever. I thought to check GetLastError and got a '5' back. However, when I called WinHelp asking for the contents, I got a success back (no surprise there) but GetLastError also again returned a '5'.
My summary is that this poorly documented or incorrectly written function (WinHelp) makes it impossible to disinguish between successful outcomes and failures.
Marriage slows down your coding, a baby slows it down even more!
|
|
|
|
|
Hi,
There have been many articles on codeproject and elsewhere on how to use a pdb file to generate a call stack, and other information in the case of a fatal exception. This works great but it requires the distribution of the pdb file with the .exe for the symbol lookup to work. This is a problem if you are worried about the possible reverse engineering of your application.
Interested to hear from anyone who may have considered this and possible solutions - e.g. encrypt .pdb file, etc
Thanks
Dig
|
|
|
|
|
|
Well, if the customer turns on the user dump, then you can get the dump file from them and analyze it post-mortem and usually tell exactly what the problem was anyway. No need to distribute the PDB at all. You do need to compile your release builds to contain the debugging information, hwoever, to make it useful.
Marriage slows down your coding, a baby slows it down even more!
|
|
|
|
|
Look up the "/PDBSTRIPPED" linker option. I think this is only available with VC>6. I think there is a utility that generates a "stripped" .PDB from a normal one (if you use VC6), but I can't remember the name.
Steve
-- modified at 1:27 Friday 13th January, 2006
|
|
|
|
|
Here's the story:
My program checks a LARGE numrer of Unicode RTF strings to find out whenever they contain one of predefined strings (given as plain text).
I need a way to search RTF string for plain text string (ignoring the formating tags). It would be pretty easy if it wasn't for the unicode part and lots of strange symbols (let me just say there's polish, english, russian and hebrew).
The only methods I could think of were serching rtf string and ignoring formating or converting to plain text an using simple cstringw::find
I've already atempted the second method and failed miserably (CRichEditCtrl + callback function + sf_rtf, sf_text, sf_unicode, as well as coping it to clipboard and atempting to capture it back).
Any WORKING method is welcome :>
Maciej Lisiewski
39s' hour of non-stop coding. I'm starting to see things and like visual studio.
|
|
|
|
|
Is there any reason you couldn't just go through character by character with your own search function?
For instance, something like:
int x = 0, j = 0;
bool MatchString()
{
while (string_you_are_searching[x])
{
if (string_you_are_searching[x] == predefined_string[j])
j++;
else
j = 0;
if (j == strlen(predefined_string))
return true;
x++;
}
}
Or something like that?
Kelly Ryan
|
|
|
|
|
Sadly, yes there is.
If I was just searching for a string inside another I'd do
if ((theString.Find(anotherString)!=-1);
But the string I'm searching in is not plain text, it's RTF. I can't just check whenever it has some other string inside because it might be ie. split in two by a formating tag, or if it contains non-english characters, it would have the waco RTF encoding in the middle of it.. :/
Anyone? I can hear a deadline zooming and it's not a good sound..
Maciej Lisiewski
Last 72 hours: Eating: 2,5h; Sleeping: 5,5h; Coding 62h; other: 2h.
Read-eyed: yup, Pale: you betcha, Barely awake: barely alive
-- modified at 4:15 Tuesday 10th January, 2006
|
|
|
|
|
Being RTF doesn't prevent a character by character search though, my point was that by writing your own char by char search you can ignore the things you want to ignore.
For instance anytime you see a \, ignore the following letters until you see a space or a return. Anytime you see a change to another language, ignore all following characters until you see a change back to English, or whatever language you're looking for.
Of course this is assuming the strings you're searching for don't contain \ in them. But if they don't, you should be able to do something along those lines. And even if they do, worst case scenario you could write up a list of all the formatting tags to ignore (horrible but it would work), and every time you see a \, begin to compare to that list, if you get a match, ignore that word, if not, tack it onto the current string you're looking through for comparison.
Kelly Ryan
|
|
|
|