Skip to content

Latest commit

 

History

History
45 lines (37 loc) · 1.38 KB

dot-safeseh.md

File metadata and controls

45 lines (37 loc) · 1.38 KB
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic f1_keywords dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
.SAFESEH | Microsoft Docs
11/04/2016
cpp-tools
article
.SAFESEH
C++
registering functions as exception handlers
SAFESEH directive
.SAFESEH directive
6eaac8c4-c46f-47ae-8a66-f5cfeb267e43
8
corob-msft
corob
ghogen

.SAFESEH

Registers a function as a structured exception handler.

Syntax

  
.SAFESEH identifier  

Remarks

identifier must be the ID for a locally defined PROC or EXTRN PROC. A LABEL is not allowed. The .SAFESEH directive requires the /safeseh ml.exe command-line option.

For more information about structured exception handlers, see /SAFESEH.

For example, to register a safe exception handler, create a new MASM file (as follows), assemble with /safeseh, and add it to the linked objects.

.386  
.model  flat  
MyHandler   proto  
.safeseh    MyHandler  
end  

See Also

Directives Reference