VCCLCompilerTool.BufferSecurityCheck プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
バッファー オーバーランをチェックするかどうかを示す値を取得または設定します。 BufferSecurityCheck コンパイラの /gs (Buffer Security Check) オプションの機能を公開します。
public:
property bool BufferSecurityCheck { bool get(); void set(bool value); };
public:
property bool BufferSecurityCheck { bool get(); void set(bool value); };
[System.Runtime.InteropServices.DispId(127)]
public bool BufferSecurityCheck { [System.Runtime.InteropServices.DispId(127)] get; [System.Runtime.InteropServices.DispId(127)] set; }
[<System.Runtime.InteropServices.DispId(127)>]
[<get: System.Runtime.InteropServices.DispId(127)>]
[<set: System.Runtime.InteropServices.DispId(127)>]
member this.BufferSecurityCheck : bool with get, set
Public Property BufferSecurityCheck As Boolean
プロパティ値
バッファー オーバーランをチェックする場合は true
、それ以外の場合は false
です。
- 属性
例
この例をコンパイルして実行する方法については、「 方法: プロジェクトモデルの拡張機能のサンプルコードをコンパイル する」を参照してください。
次の例では、 BufferSecurityCheck 統合開発環境 (IDE: integrated development environment) のプロパティを変更します。
' 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.BufferSecurityCheck = True
End Sub
End Module