Condividi tramite


IVsExpansionFunction.GetCurrentValue(String, Int32) Method

Definition

Returns the current value of the expansion function.

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

Parameters

bstrValue
String

[out] Returns a string that contains the value of the expansion function.

fHasCurrentValue
Int32

[out] Returns non-zero (true) if the expansion function has a current value; otherwise, returns zero (true). See Remarks.

Returns

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

Remarks

COM Signature

From textmgr2.idl:

bool IVsExpansionFunction::GetCurrentValue(  
   [out] BSTR *bstrValue,  
   [out] bool *fHasCurrentValue  
);  

If this method returns a value, it is placed into the associated field of the inserted code snippet. If this method does not return a value, as indicated by setting the fHasCurrentValue parameter to zero (false), the expansion function indicates that it has no current value to return. The fhasCurrentValue parameter is typically used by the caller of this method to determine whether to update the field in the code snippet.

Applies to