GWES. EXE error in Windows Mobile 5.0

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.