propputref 特性

[propputref] 特性指定使用引用而不是值的属性设置函数。

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

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