SetData Method
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

IVsUserData.SetData Method

Sets user data to a buffer.

Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in microsoft.visualstudio.textmanager.interop.dll)

int SetData (
	[InAttribute] ref Guid riidKey,
	[InAttribute] Object vtData
int SetData (
	/** @attribute InAttribute() */ /** @ref */ Guid riidKey, 
	/** @attribute InAttribute() */ Object vtData
JScript does not support passing value-type arguments by reference.



[in] Unique identifier of the data.


[in] Data to be set.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From textmgr.idl:

HRESULT IVsUserData::SetData(
   [in] REFGUID riidKey,
   [in] VARIANT vtData

A copy is made of the data, so the caller still owns the VARIANT being passed in.

© 2016 Microsoft