Commands.Raise メソッド
更新 : 2007 年 11 月
指定されたコマンドを実行します。
名前空間 : EnvDTE
アセンブリ : EnvDTE (EnvDTE.dll 内)
構文
'宣言
Sub Raise ( _
Guid As String, _
ID As Integer, _
<OutAttribute> ByRef CustomIn As Object, _
<OutAttribute> ByRef CustomOut As Object _
)
'使用
Dim instance As Commands
Dim Guid As String
Dim ID As Integer
Dim CustomIn As Object
Dim CustomOut As Object
instance.Raise(Guid, ID, CustomIn, CustomOut)
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
)
function Raise(
Guid : String,
ID : int,
CustomIn : Object,
CustomOut : Object
)
パラメータ
Guid
型 : System.String必ず指定します。コマンドの GUID。
ID
型 : System.Int32必ず指定します。コマンドの ID。
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
アクセス許可
- 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。