I am afraid to see this so-called GWES. EXE error when developing on a Windows Mobile 5.0 device. This error occurs in the program, and the program almost cannot run normally. for developers, there are not many error reports that the system can understand, that is, they do not know where the problem occurs in the program; and once this error occurs, even if the subsequent program can still run, it will often jump out of the Error Report, a word annoying. This error message is rarely displayed on systems earlier than Windows Mobile 5.0.
(When developing an application based on Windows Mobile 5.0, BTW should first check whether the "Error Report" on the device is disabled. If yes, the above error report information will not be displayed, but once enabled, problems will occur when the program is running, such as the error message popped up. Check Method: (PPC) start --> set --> System --> error report --> Start Error Report)
The following are some of the GWES. EXE errors that may occur during the development process:
1. the memory space of a string is not allocated through mallo/New. For example, the memory space of another string may be copied, but it is recycled somewhere in the program using free/Delete.
2. If it is a dynamically applied space, if it is not recycled, there will be a problem in the hopper test; the created resources, such as fonts and paint brushes, are not deleted, resulting in Memory leakage, if you run the program for a long time, GWES will also be generated. EXE error.
3. cfont boldfont;
Boldfont. createfont (0, 0, 0, 0, fw_semibold,
False, false, false, default_charset,
Out_default_precis, clip_character_precis,
Default_quality, default_pitch | ff_dontcare,
_ T (" "));
Cfont * poldfont;
Poldfont = PDC-> SelectObject (& boldfont );
// Do something
PDC-> SelectObject (poldfont );
Boldfont. deleteobject ();
// The default font is not modified later
PDC-> SelectObject (poldfont );//
This is because the program is already running and GWES. EXE error immediately occurs.
...... (To be supplemented)
At present, this is all you need. Please add it!
It can be seen that such errors are caused by carelessness. You only need to carefully review the code to avoid such errors.