VCCLCompilerTool.ExceptionHandling, propriété

Obtient ou définit une valeur utilisée pour des appels aux destructeurs pour les objets automatiques pendant un déroulement de pile provoqué par une exception levée.ExceptionHandling expose les fonctions de l'option /EH (Modèle de gestion des exceptions) du compilateur.

Espace de noms :  Microsoft.VisualStudio.VCProjectEngine
Assembly :  Microsoft.VisualStudio.VCProjectEngine (dans Microsoft.VisualStudio.VCProjectEngine.dll)

Syntaxe

'Déclaration
Property ExceptionHandling As cppExceptionHandling
cppExceptionHandling ExceptionHandling { get; set; }
property cppExceptionHandling ExceptionHandling {
    cppExceptionHandling get ();
    void set (cppExceptionHandling value);
}
abstract ExceptionHandling : cppExceptionHandling with get, set
function get ExceptionHandling () : cppExceptionHandling
function set ExceptionHandling (value : cppExceptionHandling)

Valeur de propriété

Type : Microsoft.VisualStudio.VCProjectEngine.cppExceptionHandling
Valeur cppExceptionHandling.

Exemples

Consultez l'Comment : compiler l'exemple de code pour l'extensibilité du modèle de projet pour plus d'informations sur comment compiler et exécuter cet exemple.

L'exemple suivant modifie la propriété d'ExceptionHandling dans (IDE) l'environnement de développement intégré :

' add reference to Microsoft.VisualStudio.VCProjectEngine.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim cfgs, tools As IVCCollection
        Dim cfg As VCConfiguration
        Dim tool As VCCLCompilerTool
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCCLCompilerTool")
        tool.ExceptionHandling = True
    End Sub
End Module

Sécurité .NET Framework

Voir aussi

Référence

VCCLCompilerTool Interface

Microsoft.VisualStudio.VCProjectEngine, espace de noms