Export (0) Print
Expand All

IDTCommandTarget Interface

Visual Studio .NET 2003

This interface allows you to create named commands. You must implement this interface to handle new named commands.


[Visual Basic .NET]
Public Interface IDTCommandTarget
    Inherits IDispatch
[Visual Basic 6]
Class IDTCommandTarget
interface IDTCommandTarget : IDispatch
public interface IDTCommandTarget : IDispatch
[JScript .NET]
public interface IDTCommandTarget extends IDispatch


The IDTCommandTarget interface allows you to implement named commands in the environment. It also allows you to define the status of a command or execute it.

If you enter a command that was added with the AddNamedCommand method into the Command window, the Command window first checks to see if the command is enabled or not, using the IDTCommandTarget interface's QueryStatus method. The same also applies if you call the ExecuteCommand method.

If an Add-in implements this interface in addition to IDTExtensibility2, then command execution is routed directly to this interface for named commands created by the Add-in.

This interface is analogous to the IOleCommandTarget interface defined in the Win32 SDK, except that the parameters of the method were modified to be OLE Automation compliant.


Namespace: EnvDTE

File: dte.tlb


Implements IDTCommandTarget

See Also

Properties, Methods, and Events

© 2015 Microsoft