Share via


IVsExpansionFunction.GetCurrentValue Method

Returns the current value of the expansion function.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

Syntax

'Declaration
Function GetCurrentValue ( _
    <OutAttribute> ByRef bstrValue As String, _
    <OutAttribute> ByRef fHasCurrentValue As Integer _
) As Integer
int GetCurrentValue(
    out string bstrValue,
    out int fHasCurrentValue
)
int GetCurrentValue(
    [OutAttribute] String^% bstrValue, 
    [OutAttribute] int% fHasCurrentValue
)
abstract GetCurrentValue : 
        bstrValue:string byref * 
        fHasCurrentValue:int byref -> int
function GetCurrentValue(
    bstrValue : String, 
    fHasCurrentValue : int
) : int

Parameters

  • bstrValue
    Type: System.String%

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

  • fHasCurrentValue
    Type: System.Int32%

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

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 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.

.NET Framework Security

See Also

Reference

IVsExpansionFunction Interface

Microsoft.VisualStudio.TextManager.Interop Namespace