Share via


IVsAppCommandLine.GetOption(String, Int32, String) Method

Definition

Retrieves the command line switches.

public:
 int GetOption(System::String ^ pszOptionName, [Runtime::InteropServices::Out] int % pfPresent, [Runtime::InteropServices::Out] System::String ^ % pbstrOptionValue);
int GetOption(std::wstring const & pszOptionName, [Runtime::InteropServices::Out] int & pfPresent, [Runtime::InteropServices::Out] std::wstring const & & pbstrOptionValue);
public int GetOption (string pszOptionName, out int pfPresent, out string pbstrOptionValue);
abstract member GetOption : string * int * string -> int
Public Function GetOption (pszOptionName As String, ByRef pfPresent As Integer, ByRef pbstrOptionValue As String) As Integer

Parameters

pszOptionName
String

[in] Command line switch name.

pfPresent
Int32

[out] Flag indicating if user entered command line switch pszOptionName.

pbstrOptionValue
String

[out] BSTR containing text the user entered as a parameter of the command line switch.

Returns

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

Remarks

This method is safe to access from any thread.

Applies to