Debug assertion failed! [HLP]

Source: Internet
Author: User

This problem was encountered when debugging a multi-target tracking program in vs2008. The problem was ignored in the next release. In the release version, you do not need to worry about this problem, that is, the system helped you block it, but the problem still exists. Such an error is reported in the debug environment.

Error cause:

This code is correct and incorrect on the platform.

Nm. cbsize = sizeof (nonclientmetrics); this is an earlier version, usually known as 0x0501. If the version is lower than the system and vs compiler versions (vs2008/vs2010), problems may occur.

Solution:

In stdafx. h.

# Pragma once

# Ifndef _ secure_atl
# DEFINE _ secure_atl 1
# Endif

# Ifndef vc_extralean
# Definevc_extralean          /// Exclude rarely-used stuff from Windows Headers
# Endif

This statement is followed by the following sentence:

# Ifndefwinver   // Allows the use of features specific to Windows XP or later.
# Define winver 0x0501 // Change the value to the corresponding value to apply to other versions of Windows.
# Endif

# Ifndef _ win32_winnt // Allows the use of features specific to Windows XP or later.
# DEFINE _ win32_winnt 0x0501// Change the value to the corresponding value to apply to other versions of Windows.
# Endif 

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.