exe disappears itself in 5-10 minutes
Hi All
I used Windows management Instrumentation, registry access (used RegOpenKeyEx etc.) , & few APIs to build an application.
Now problem is that when i run the program then after 5-10 minutes dialog box(of exe) disappeares automatically.
What should I do to prevent this problem.
Please reply ..
Thanks & Regards.
Re: exe disappears itself in 5-10 minutes
To "prevent this problem" you should find out the bug(s) in your program and fix it (them).
If you are not be able to do it yourself and you need our help - please, describe your problem more clearly and post the code or/and a small project reproducing such "erroneous behaviour"...
Re: exe disappears itself in 5-10 minutes
Dear Sir\Madam hi
As I have told that program is running well and gives output as required but the problem is that it automatically get disappeared.
So please tell the possible reasons of occuring this and so that I could be able to find & fix the bugs in program if I would not be able then i will send or mail code.
Please reply
Thanks & bye.
Re: exe disappears itself in 5-10 minutes
There can be many reasons. For instance the program is written in such a way that after completing some operation it closes. Who have written the program? You? When does this program close? How are error treated? Do they result in program's closure?
Another reason is that some other application closes your program. However, I believe this is rather not the case.
I would suggest to take a look at the program and spot all the places were the program is terminated (a WM_CLOSE message is posted, exit(), ExitProcess() or TerminateProcess() are called, etc. depending on your program).
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by rajeevktripathi
Dear Sir\Madam hi
As I have told that program is running well and gives output as required but the problem is that it automatically get disappeared.
So please tell the possible reasons of occuring this and so that I could be able to find & fix the bugs in program if I would not be able then i will send or mail code.
Thanks & bye.
1. What do you mean by "disappeared"? Does it exit or it only gets hidden?
2. Are there in your program some "exit" calls such as exit(), TerminateProcess(), ExitProcess(), ...?
3. If the program exits "itself" - try to find out the reason: add the WM_DESTROY, WM_CLOSE message handlers in your main dialog class, set break points and debug your program - see if you'll step in one of these message handlers and try to understand - why.
Re: exe disappears itself in 5-10 minutes
exe disappears means that application terminates as when we close any application by clicking on "x" button or by pressing "alt+F4".
I neither used any terminate function nor it has been written in such a way that it should be closed after performing any function.
Re: exe disappears itself in 5-10 minutes
Well, we are not magicians to remotely spot the problems on your program or PC. I don't see anything else to say that could help you with the information provided so far.
What is your program supposed to do?
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by rajeevktripathi
exe disappears means that application terminates as when we close any application by clicking on "x" button or by pressing "alt+F4".
I neither used any terminate function nor it has been written in such a way that it should be closed after performing any function.
Rajeev, it's really hard to find out the problem with the little info you provided e.g. we even dont know for sure how long it takes the application to exist, it could be 5.9 or 9.6 minutes. Come on, tell us whats the exact number....
HTH,
Regards,
Usman.
Re: exe disappears itself in 5-10 minutes
another thing to add here, when your so called dialog "disapper" did you check the task manager to see if your exe is still running?
casue maybe somewhere in your code the window is hiding itself. (SW_HIDE is another thing you should look for in addtion to all the pointers you got from cilu)
but thats only if the exe is still running and you just dont see the dialog.
Cheers
Re: exe disappears itself in 5-10 minutes
Quote:
Come on, tell us whats the exact number....
I don't really see how it would help you to know whether the app closes after 7:12 or 9:07 or anything else.
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by cilu
I don't really see how it would help you to know whether the app closes after 7:12 or 9:07 or anything else.
You probably didn't catch the sarcasm :(.
Re: exe disappears itself in 5-10 minutes
Code:
try
{
read posts
}
catch( sarcasm& s)
{
lol
}
It's funny to see 2 people fighting to help a 3rd one which doesn't bother to help herself/himself. ;) To the OP: before you start a civil war on CG do post more data about what happens in your app.
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by usman999_1
You probably didn't catch the sarcasm :(.
Ooops... Definitelly not. ;)
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by PadexArt
....
It's funny to see 2 people fighting to help a 3rd one which doesn't bother to help herself/himself. ;)
:thumb: :thumb: :thumb:
Re: exe disappears itself in 5-10 minutes
Information related to program are as as follows
1) Program is written in VC++ 6.0.
2) WMI Classes for retrieving system hardware & software Inforamation.
3) Used Registry keys for information retrieval,(here I used RegOpenKeyEx(),RegEnumVale(), RegEnumKey() etc.)
4) Used some APIs for information retrieva(like OS Version, Computer Name, Number of processors etc.)
5) All the property pages are added to sheet in OnInitDialog() function.
6) Also everything is written in OnInitDialog().
7) For every resource(S/W or H/W) a linked list is created .
8) node of Linked list is structure whose attributes are TCHAR and _bstr_t type
9)structures contains all the information retrieved by either WMI, or by Registry or by APIs.
10) Finally values are displayed on property pages through structures.
* I have checked task manager there is no instance of program after termination.
* Time span is not more than 10 mins.
*Program is even terminated when i am continually clicking on varios controls, and tabs of dialog box.
*Also program is even terminated when there are no activities being done on the PC
Please reply .
Thanks