|
It's difficult to see the problem. What you can do to narrow the problem is use your debugger (press F5) to see where in your code the crash occurs. Then you can watch for the different variables and check if everything is correct.
You can also set breakpoint (press F9) before the crash to see the evolution of the variables.
|
|
|
|
|
Did you try debugging? Where exactly is the app crashing?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
The debugger does not take me to any line in my code. It crashes after the second filedialog has been displayed and all i get is a "Show disasembly" option which does nothing
|
|
|
|
|
How can that happen! I hope you have set break points. Have you?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
where do you want me to set brakepoints? i've set them for every line in my code but the application dies while browsing for the file (ie: CFileDialog::DoModal() never returns)
|
|
|
|
|
What does the call stack look like?
Is there any line that points to code for which you have source code?
I assume you have built your application for debug...
--
Rog
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
no...debug does not point to my code
|
|
|
|
|
When you come to Domodal set a breakpoint after it
|
|
|
|
|
...it dies during CFileDialog::DoModal() method (i mean, it dies while my dialog waits for CFileDialog::DoModal() to return)
7CA5159E call dword ptr [ecx+14h]
That's the disassembly code, but i don't know what to do with it, i don't think it helps
|
|
|
|
|
Did you try displaying a message box before and after your CFileDialog creation? What happens in that case?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
it dies only if there's verry little time between pressing the two buttons. If i put a message box anywhere...it will work
|
|
|
|
|
eusto wrote: If i press the frist one, select a file than press the seccond one, my application crashes...
What happens if you reverse this process?
Which of the four statements after DoModal() is crashing? Set a breakpoint to find out.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
None of the four statements after DoModal() is crashing!..none! DoModal() doesn't even return. Anyways, i've narrowed it down. It crashes when i move trough folders in the CFileDialog window. And it doesn't really matter wich of the two buttons i press first.
|
|
|
|
|
This is just a complete guess, but how about commenting out everything after the DoModal() call?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
this was my last resort too but it still failed I'm putting this thing to rest and i'll get to it some other time... Maybe there's a problem with my computer( a virus or smth...don't know ). The problem is clearly in the CFileDialog class but i can't figure it out.
|
|
|
|
|
eusto wrote: The problem is clearly in the CFileDialog class...
To further verify that, use GetOpenFileName() instead.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I've used GetOpenFileName() and it behaves just the same
|
|
|
|
|
Nevermind, sorry for bugging you so much. I've recompiled the project on another machine and it works like a charm. I guess the problem is in my VStudio instalation or something...i don't know
|
|
|
|
|
Could somebody please advise me as to how to go about this problem.
I wish to compile a list of all the bookmarks stored on a given PC. The PC may have one or more browsers installed but the browser may or may not be installed in the standard "program files" folder. How is it possible to first determine if the browser is installed and then determine where it is installed?
The problem here is not reading the bookmarks, but rather finding them.
|
|
|
|
|
You can probably start by looking at the subkeys under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan
|
|
|
|
|
To find the location of the default browser, use AssocQueryString() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
In my system some ports are blocked.How can i know which ports are blocked.Is there any solution to find the above problem.please kindly help me and Give me a solution.
#sanroop#
|
|
|
|
|
Sanroop wrote: In my system some ports are blocked
Blocked by who/what?
|
|
|
|
|
Blocked by Networkadministrator .That b;locked port required to find out programatically.
#sanroop#
|
|
|
|
|
The only way I know is using UPnP. The device blocking the ports needs to support UPnP and
UPnP needs to be enabled on the device. I don't know how many network admins allow this, since
allowing applications to open ports through firewalls and/or NAT devices negates the security.
This article may help:
Using UPnP for Programmatic Port Forwardings and NAT Traversal
[^]
|
|
|
|