Commands2.Raise メソッド

指定されたコマンドを実行します。

名前空間:  EnvDTE80
アセンブリ:  EnvDTE80 (EnvDTE80.dll 内)

構文

'宣言
Sub Raise ( _
    Guid As String, _
    ID As Integer, _
    <OutAttribute> ByRef CustomIn As Object, _
    <OutAttribute> ByRef CustomOut As Object _
)
void Raise(
    string Guid,
    int ID,
    out Object CustomIn,
    out Object CustomOut
)
void Raise(
    [InAttribute] String^ Guid, 
    [InAttribute] int ID, 
    [InAttribute] [OutAttribute] Object^% CustomIn, 
    [InAttribute] [OutAttribute] Object^% CustomOut
)
abstract Raise : 
        Guid:string * 
        ID:int * 
        CustomIn:Object byref * 
        CustomOut:Object byref -> unit
function Raise(
    Guid : String, 
    ID : int, 
    CustomIn : Object, 
    CustomOut : Object
)

パラメーター

  • Guid
    型 : String

    必須。 コマンドの GUID。

  • ID
    型 : Int32

    必須。 コマンドの ID。

  • CustomIn
    型 : Object%

    必須。 OLECommandTarget のパラメーターで。

  • CustomOut
    型 : Object%

    必須。 OLECommandTarget の出力パラメーター。

Sub RaiseExample()
   ' Before running, you must add a reference to the Office 
   ' typelib to gain access to the CommandBar object.
   Dim cmds As Commands
   Dim cmdobj As Command
   Dim customin, customout As Object
   Dim colAddins As AddIns

   ' Set references.
   colAddins = DTE.AddIns()
   cmds = DTE.Commands
   cmdobj = cmds.Item("File.NewFile")

   ' Execute the File.NewFile command.
   cmds.Raise(cmdobj.Guid, cmdobj.ID, customin, customout)
End Sub

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

関連項目

Commands2 インターフェイス

EnvDTE80 名前空間