IVsParseCommandLine.GetSwitchValue Method

Gets the parsed value of a switch by index.

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

Syntax

'宣言
Function GetSwitchValue ( _
    iSwitchIndex As Integer, _
    <OutAttribute> ByRef pbstrValue As String _
) As Integer
'使用
Dim instance As IVsParseCommandLine
Dim iSwitchIndex As Integer
Dim pbstrValue As String
Dim returnValue As Integer

returnValue = instance.GetSwitchValue(iSwitchIndex, _
    pbstrValue)
int GetSwitchValue(
    int iSwitchIndex,
    out string pbstrValue
)
int GetSwitchValue(
    [InAttribute] int iSwitchIndex, 
    [OutAttribute] String^% pbstrValue
)
function GetSwitchValue(
    iSwitchIndex : int, 
    pbstrValue : String
) : int

Parameters

  • iSwitchIndex
    Type: System.Int32

    [in] Index of the switch value to return.

  • pbstrValue
    Type: System.String%

    [out] Pointer to a string containing the switch value.

Return Value

Type: System.Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsParseCommandLine::GetSwitchValue(
   [in] int iSwitchIndex, 
   [out, retval] BSTR* pbstrValue
);

Permissions

See Also

Reference

IVsParseCommandLine Interface

IVsParseCommandLine Members

Microsoft.VisualStudio.Shell.Interop Namespace