propputref 屬性

[propputref]屬性會指定使用參考而非值的屬性設定函式。

[propputref [,optional-property-attributes]] return-type function-name( parameters);

參數

optional-property-attributes

零個或多個屬性屬性。

return-type

遠端程式所傳回之資料類型。

function-name

遠端程式的名稱。

parameters

遠端程式的零個或多個參數。

備註

具有 [propputref] 屬性的函式也必須具有具有 [in] 屬性的指標,做為其最後一個參數。

屬性的名稱必須與函式相同。 最多可以指定函式的其中一個[propget][propput] 和 [propputref]屬性。

Flags

INVOKE_PROPERTYPUTREF

範例

interface InMyFace : IDispatch 
{
    [propget, 
     helpstring("A meaningful comment."), 
     id(1)] HRESULT Method2([out, retval] YourInterface** ReturnVal); 
    [propputref, 
     helpstring("Another meaningful comment."), 
     id(1)] HRESULT Method2([in] YourPoint* Point);
}

另請參閱

使用 MIDL 產生類型程式庫

in

ODL 檔案範例

ODL 檔案語法

propget

propput

TYPEFLAGS