Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1642435
  • 博文数量: 268
  • 博客积分: 8708
  • 博客等级: 中将
  • 技术积分: 3764
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-06 15:58
文章分类

全部博文(268)

文章存档

2014年(1)

2013年(15)

2012年(23)

2011年(60)

2010年(51)

2009年(12)

2008年(59)

2007年(47)

分类: C/C++

2008-01-17 11:47:37

ASSERT

ASSERT tests an expression. If the expression is false, it breaks into the kernel debugger.

VOID
  ASSERT(
    
    );

Parameters

Expression
Specifies any logical expression.

Headers

This routine is defined in ntddk.h and wdm.h. Include ntddk.h or wdm.h.

Comments

This routine can only be used in Windows 2000 and later.

This macro will only be included in your binary if your code is compiled in a . Once your driver has been built, ASSERT will work properly regardless of whether your driver is run on the checked build or on the free build of Windows.

If Expression evaluates to TRUE, this routine has no effect.

If Expression evaluates to FALSE, a message will be displayed in the Debugger Command window. The message contains the source-code string of Expression, as well as the path of the source-code file and the line number in that file of the instruction that called the macro. In this event, ASSERT can be ignored and the process or thread in which ASSERT occurred can be terminated. Alternatively, the debugger can be used to analyze the situation or to edit memory. If ASSERT is ignored, execution continues as if the g command was entered.

See Also

阅读(803) | 评论(0) | 转发(0) |
0

上一篇:关于SendMessage

下一篇:C++error

给主人留下些什么吧!~~