IVsUserData Interface
Collapse the table of content
Expand the table of content

IVsUserData Interface


Allows a caller to use a GUID to set or get user data (properties).

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

public interface IVsUserData

System_CAPS_pubmethodGetData(Guid, Object)

Returns user data from a buffer.

System_CAPS_pubmethodSetData(Guid, Object)

Sets user data to a buffer.

The IVsUserData interface is a generic grouping of properties, the most important of which is the buffer's moniker. This interface is used to set or retrieve properties (data) from the buffer. A GUID indexes the properties, which are then returned in a VARIANT.

Using IVsUserData is not a particularly efficient way to get and set user data. For quick access (idle time, loops, time-critical code, and so on), it is recommended that you cache the data instead.

Notes to Implementers:

Implement in cases where text buffer objects need to get or set user data.

Return to top
© 2015 Microsoft