次の方法で共有


Commands.Raise メソッド

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

名前空間:  EnvDTE
アセンブリ:  EnvDTE (EnvDTE.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
)

パラメーター

  • CustomIn
    型: System.Object%
    必須。OLECommandTarget から渡される SafeArray の引数。
  • CustomOut
    型: System.Object%
    必須。OLECommandTarget に渡し、OLECommandTarget が返す SafeArray の引数。

' Macro code.
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 セキュリティ

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

参照

参照

Commands インターフェイス

EnvDTE 名前空間