IVsTextStorage2::GetVersionCookie Method (UInt32)

 

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)

int GetVersionCookie(
	[OutAttribute] unsigned int% pdwVersionCookie
)

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.

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

Return to top
Show: