Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.


Visual Studio 2005

This function inserts a trap instruction.

int __cdecl __trap(



[in] The trap number.

The integer value provided by the trap handler. If the trap handler provides no return value, the return value is undefined.

The compiler backend can enforce restrictions on the arguments, including the trap number, and can define a special calling convention for the trap.

The interpretation of the trap number and the actions taken by the trap handler are not defined.

Routine Required header Architecture



x86, ARM, SH-4, MIPS

Community Additions

© 2015 Microsoft