共用方式為


ref (C++)

識別的參考指標。

[ref]

備註

ref C + + 屬性具有相同的功能,為 ref MIDL 屬性。

範例

下列程式碼示範如何使用ref屬性:

// cpp_attr_ref_ref.cpp
// compile with: /LD
#include <windows.h> 
[module(name="ATLFIRELib")];
[dispinterface, uuid("00000000-0000-0000-0000-000000000001")]
__interface IFireTabCtrl
{
   [id(1), unique] char * GetFirstName([in, ref] char * pszFullName ); 
};

需求

屬性內容

適用於

typedef介面參數、 介面方法

可重複

必要的屬性

None

無效的屬性

None

如需有關屬性內容的詳細資訊,請參閱屬性內容

請參閱

其他資源

IDL 屬性

Typedef、Enum、Union 和 Struct 屬性

參數屬性

Attributes Samples