This documentation is archived and is not being maintained.

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.