次の方法で共有


IVsUserData.SetData(Guid, Object) Method

Definition

Sets user data to a buffer.

public:
 int SetData(Guid % riidKey, System::Object ^ vtData);
public int SetData (ref Guid riidKey, object vtData);
abstract member SetData : Guid * obj -> int
Public Function SetData (ByRef riidKey As Guid, vtData As Object) As Integer

Parameters

riidKey
Guid

[in] Unique identifier of the data.

vtData
Object

[in] Data to be set.

Returns

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

Remarks

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.

Applies to