IVsParseCommandLine Interface

Parses command line arguments for implementers of IOleCommandTarget. You can get an instance of the interface from the SVsParseCommandLine (SID_SVsParseCommandLine) service.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

[InterfaceTypeAttribute()]
[GuidAttribute("366704D5-85D0-4F7D-B267-90FA4DD37D5B")]
public interface IVsParseCommandLine

The IVsParseCommandLine type exposes the following members.

  NameDescription
Public methodEvaluateSwitchesEvaluates command line switches based on switch definitions.
Public methodGetACParamRetrieves an auto completion command line item.
Public methodGetCommandGets the current command.
Public methodGetCommandTailReturns the tail of the command line—characters remaining after the defined switches and arguments.
Public methodGetParamReturns a parameter by index.
Public methodGetParamCountGets the number of command line parameters.
Public methodGetRawSwitchReturns a raw, unparsed switch by index.
Public methodGetRawSwitchValueReturns the raw, unparsed value of the switch by index.
Public methodGetSwitchCountReturns the number of switches in the command line.
Public methodGetSwitchValueGets the parsed value of a switch by index.
Public methodGetSwitchValueCountGets the number of switch values on the command line.
Public methodHasParamsQueries whether or not there are command line parameters.
Public methodHasSwitchesQueries whether or not there are command line switches.
Public methodHasSwitchValuesQueries whether or not there are command line switch values.
Public methodIsSwitchPresentQueries, by index, whether or not a given switch is present.
Public methodParseCommandLineParses the command line as preparation for using other interface methods to retrieve the parsed elements.
Public methodParseCommandTailParses the tail of the command line.
Public methodQuoteParamQuote a parameter string and escape characters within the string appropriately.
Public methodRejectAllSwitchesTests for whether or not there were any switches.
Public methodSwitchHasValueTests, by index, whether or not a specific switch has a value.
Public methodValidateParamCountVerify the parameter count is within a specific range.
Top

Use the ParseCommandLine method to parse the command line. You can then use the other interface methods to retrieve switches, values, and parameters.

For more information about IOleCommandTarget see TN071: MFC IOleCommandTarget Implementation.

COM Signature

From vsshell.idl:

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft