Commands.Raise(String, Int32, Object, Object) Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Выполняет указанную команду.
public:
void Raise(System::String ^ Guid, int ID, [Runtime::InteropServices::Out] System::Object ^ % CustomIn, [Runtime::InteropServices::Out] System::Object ^ % CustomOut);
void Raise(std::wstring const & Guid, int ID, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & CustomIn, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & CustomOut);
[System.Runtime.InteropServices.DispId(4)]
public void Raise (string Guid, int ID, out object CustomIn, out object CustomOut);
[<System.Runtime.InteropServices.DispId(4)>]
abstract member Raise : string * int * obj * obj -> unit
Public Sub Raise (Guid As String, ID As Integer, ByRef CustomIn As Object, ByRef CustomOut As Object)
Параметры
- Guid
- String
Обязательный. GUID команды.
- ID
- Int32
Обязательный. Идентификатор команды.
- CustomIn
- Object
Обязательный. Аргументы в безопасном массиве, передающиеся из OLECommandTarget.
- CustomOut
- Object
Обязательный. Аргументы в безопасном массиве, передаваемые в OLECommandTarget.
- Атрибуты
Примеры
' 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
' Set references.
cmds = DTE.Commands
cmdobj = cmds.Item("File.NewFile")
' Execute the File.NewFile command.
cmds.Raise(cmdobj.Guid, cmdobj.ID, customin, customout)
End Sub