다음을 통해 공유


IVsTextStorage2.GetVersionCookie Method

Gets a version cookie on the data.

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

Syntax

‘선언
Function GetVersionCookie ( _
    <OutAttribute> ByRef pdwVersionCookie As UInteger _
) As Integer
int GetVersionCookie(
    out uint pdwVersionCookie
)
int GetVersionCookie(
    [OutAttribute] unsigned int% pdwVersionCookie
)
abstract GetVersionCookie : 
        pdwVersionCookie:uint32 byref -> int 
function GetVersionCookie(
    pdwVersionCookie : uint
) : int

Parameters

  • pdwVersionCookie
    Type: System.UInt32%
    [out] The version cookie.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

The version cookie starts at 0 and is incremented every time the data in the text storage is changed.

This method should provide a quick test to determine whether the text storage contents have changed. It may produce false positives (e.g. incrementing the version number even though no substantive change was made (for example, replacing "a" with "a").

.NET Framework Security

See Also

Reference

IVsTextStorage2 Interface

Microsoft.VisualStudio.TextManager.Interop Namespace