Microsoft Windows CE 3.0  

Surface Uniqueness Values

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The uniqueness value of a surface allows you to determine whether the surface has changed. When DirectDraw creates a surface, it assigns a uniqueness value, which you can retrieve and store by using the IDirectDrawSurface5::GetUniquenessValuemethod. Then, whenever you need to determine whether the surface has changed, you call the method again and compare the new value against the old one. If it's different, the surface has changed.

The actual value returned by GetUniquenessValueis irrelevant, unless it is 0. DirectDraw assigns this value to a surface when it knows that the surface might be changed by some process beyond its control. When GetUniquenessValuereturns 0, you know only that the state of the surface is indeterminate.

To force the uniqueness value for a surface to change, an application can use the IDirectDrawSurface5::ChangeUniquenessValuemethod. This method could be called, for example, by an application or component that changed the private data for a surface without changing the surface itself, and wished to notify some other process of the change. Most applications, however, never need to change the uniqueness value.



 Last updated on Tuesday, May 18, 2004

© 2004 Microsoft Corporation. All rights reserved.