|
Hi, just wonder if there is any example on explaining the usage?
Thanks for your help!
|
|
|
|
|
Look at this article for ideas and some samples:
http://www.codeproject.com/system/timers_intro.asp#WaitableTimers
|
|
|
|
|
Hi
I'm using VC++ .NET. Just recently I started having this problem where changes I make to my source code in the IDE are not being carried over to the corresponding files in my project folder. For example, I will add a new line of code to GraphPlot.cpp using the Solution Explorer, then select "save all" from the file menu. But then when I go look in the GraphPlot.cpp file directly (like opening it with Emacs), the new line of code is not there! whats going on!?
thank you so much
htuba
|
|
|
|
|
Are the changes being cached, or is some other copy of GraphPlot.cpp being updated?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi,
Suppose I am using XML to define a database structure. I want to use this XML definition to create database and insert table and attributes at run-time. I don't want to use data source "User DSN" or "System DSN", ... stuff.
Is there a existing class that can handle this? How can I do it?
Thank you very much!!!
|
|
|
|
|
I have a DLL which contains a couple of dialogs. In one dialog I am able to enter chinese characters and they display correctly. In another dialog the characters are displayed as black blocks. The characters are correct - they just display incorrectly. Both dialogs are compiled with the same settings (_UNICODE etc.). The resource settings appear to be the same. Anyone have any idea why one displays correctly and the other does not?
Jason
|
|
|
|
|
Hello,
How do I delay the sending of an email so that it appears as though it was sent some time in the future?
Because outlook still shows the original time that I pressed the send button, how do I attach a timer to the send button and then have that timer "press" the send button while the computer has the screen saver on?
Or, is there an app that already does this?
thanks,
JennyP
|
|
|
|
|
Hi,
We have an fairly complex GUI application presenting growing meters and videos.
The application crashes sometimes and the original programmer is not available to fix the bugs right now, before the release on the cosumer's site.
Independent of the bug fixing, which will be done some time in the future, our real problem is not the crashes themselves, but the fact that when it does crash, a window appears on the screen and it blocks the application.
We want to avoid that window appearing so we can launch the application on a infinite BAT loop like this:
@echo off
:loop
program.exe
goto loop
So everytime the app crashed for ANY reason it is up again with no user interaction. (This app is just a information display, not a user interactive one) We don't care about the state of the app, it receives information from the network so the faster it restarts, the sooner it gets functional again.
We are programming it on C++ and we have tried to capture the exiting signals (SIGSEGV, SIGFPE, etc) and doing an ExitProcess(), but this only works on some console based test apps we did, not in the crashing GUI display program we want to restart automatically.
How can we avoid this damned window?
We tried at system> advanced settings, but this only changes the type of window displayed, it does not make it disapear.
Thank you very much for your help,
Jose
|
|
|
|
|
jlvazquez wrote:
...a window appears on the screen...
What window?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
The tipical Windows XP error window:
"Application X has crashed, bla bal bla"
"Send bug report...?"
"Acept" "Cancel"
The problem is that a window expecting user input appears.We don't want any user input question. If it fails we want it to do silently (maybe generating a crash log file) so we can restart it again automatically WITH NO USER interaction.
The PC does not even need a keyboard in our application.
Thanks!
Jose
|
|
|
|
|
You may be able to turn off some or all off the messages by modifying XP's error reporting options: MyComputer | Properties | Advanced | ErrorReporting.
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib@ravib.com
|
|
|
|
|
The quick & dirty way (which it sounds like you need) it to put a try/catch(...) around your WinMain() and in the thread function of any additional threads you create. The catch clause can call ExitProcess() to terminate the app silently.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
And if he has an MFC app?
Could you write your own message pump and put a try/catch(...) around that? There is already exeption handling code around the calls of message handlers in DispatchMessage .
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Thanks!!
This really worked.
I searched all threads and add a try/catch(...) arround every one of them.
Now the app crashes silently and a simple BAT file respawns it again quickly.
I am still testing to see if it covers all cases, but it seems very promising.
Thanks again for your help. I didn't know in C++ it lauched exceptions even for critical stuff such as "segfaults" before releasing the real signal.
Jose
|
|
|
|
|
I would absolutly delay the release.
Even if a really bad work around exists, having an application that crashes so often will only make you ( and your team ) look bad.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
If I could delay the release I would rather rewrite it all from scratch.
Is it really so difficult to avoid Windows XP displaying a annoying error window.
Then windows xp is no suitable for non interactive application display-only apps.
I could not believe that.
|
|
|
|
|
jlvazquez wrote:
Is it really so difficult to avoid Windows XP displaying a annoying error window.
Yes, fix the error and the window will no longer appear.
jlvazquez wrote:
Then windows xp is no suitable for non interactive application display-only apps.
Sure it is, but it's reasonable to assume that applications will not leave the developer's desk with known issues that would cause the OS to complain with such a message.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
You are right that known issues should not be released, but will you bet your job that your code has no bugs (no unknown issues) before a release?
I wouldn't, that's why I need a behaviour that allows me to automatically restart the app (non interactivelly), and probably leaving a core dump or log that allows me to locate the issue and fix it. All this without service disrruption (=the costumer getting too angry).
We are talking about Hign Availabitity here; bugs happen, our app needs to avoid service disrruptions caused by them and be back online ASAP.
I am still trying to get this working, now I am trying the try/catch approach in all threads.
Thanks very much for your help,
Jose
|
|
|
|
|
See the WIN32 API SetErrorMode() in the docs. Place this call in your InitInstance() MFC function, or WinMain() function.
onwards and upwards...
|
|
|
|
|
I tried this one, it was very promising, but in the end the cure was wor se than the illness.
Now the app freezes and it is not possible to restart it again, as it does not respond.
I just want the default unix app behaviour, "Segmentation faul, (core dumped)"
the app dies and a simple script will relaunchit again before the user can notice it.
Thanks for your help anyway!
Jose
|
|
|
|
|
Replace the Just In Time debugger on the customer's machine with a dummy one! That way, it will never come up. Or, run the application in a debugger with Image File Execution Options, execpt another one of your applications is the debugger. All u need to detect is if it crashes. if it crashes, just exit and it will restart automatically.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
How do you create a file with write permissions for Everyone?
|
|
|
|
|
Hi all,
I'm just imported a new dialog resource (and associated code) into an existing project. When I call the DoModal() function to display the dialog, it generates an entry on the windows taskbar. Why? and how can I stop this? Thanks in advance.
Brian Summers
System Programmer
|
|
|
|
|
|
I believe so...here is the constructor...
CPartitionsDlg::CPartitionsDlg(CWnd* pParent /*=NULL*/)
: CDialog(CPartitionsDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CPartitionsDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
// m_hIcon = AfxGetApp()->LoadIcon(IDR_PARTITION);
}
|
|
|
|