Share via


DbgAssert

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function handles an assertion failure in a debug build.

DbgAssert displays a message box that includes the condition text, source file name, and source line number.

The user can ignore the assertion failure, debug the assertion, or force the application to exit. Thus, DbgAssert might return to the caller, depending on the user's actions.

Syntax

void WINAPI DbgAssert(
  const TCHAR* pCondition,
  const TCHAR* pFileName,
  INT iLine
);

Parameters

  • pCondition
    Pointer to a string version of a Boolean expression.
  • pFileName
    Pointer to a source file name.
  • iLine
    Line number within the source file.

Remarks

This function is available only in a debug build. Usually, DbgAssert will be called by macros, not directly from other code.

If you use a macro, DbgAssert might display a message box. If this is not acceptable in your environment, you can use DbgKernelAssert instead.

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment, Version 2.12 requires DXPAK 1.0 or later

See Also

Reference

Assert Functions