다음을 통해 공유


IVsUserData.GetData(Guid, Object) Method

Definition

Returns user data from a buffer.

public:
 int GetData(Guid % riidKey, [Runtime::InteropServices::Out] System::Object ^ % pvtData);
public int GetData (ref Guid riidKey, out object pvtData);
abstract member GetData : Guid * obj -> int
Public Function GetData (ByRef riidKey As Guid, ByRef pvtData As Object) As Integer

Parameters

riidKey
Guid

[in] Unique identifier of the data.

pvtData
Object

[out] Pointer to a VARIANT containing the user data.

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::GetData(  
   [in] REFGUID riidKey,  
   [out] VARIANT *pvtData  
);  

If you want to retain the contents of the variant, then copy the data to the cache.

Applies to