IVsTextStorage2.GetVersionCookie(UInt32) 方法

定义

获取数据的版本 cookie。

public:
 int GetVersionCookie([Runtime::InteropServices::Out] System::UInt32 % pdwVersionCookie);
int GetVersionCookie([Runtime::InteropServices::Out] unsigned int & pdwVersionCookie);
public int GetVersionCookie (out uint pdwVersionCookie);
abstract member GetVersionCookie : uint32 -> int
Public Function GetVersionCookie (ByRef pdwVersionCookie As UInteger) As Integer

参数

pdwVersionCookie
UInt32

弄版本 cookie。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

版本 cookie 从0开始,并在每次更改文本存储中的数据时递增。

此方法应提供快速测试来确定文本存储内容是否已更改。 它可能会产生误报 (例如,即使未进行实体更改也会递增版本号 (例如,将 "a" 替换为 "a" ) 。

适用于