ref (C++)
Identifies a reference pointer.
Syntax
[ref]
Remarks
The ref C++ attribute has the same functionality as the ref MIDL attribute.
Example
The following code shows how to use the ref attribute:
// 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 );
};
Requirements
Attribute context | Value |
---|---|
Applies to | typedef , interface parameter, interface method |
Repeatable | No |
Required attributes | None |
Invalid attributes | None |
For more information about the attribute contexts, see Attribute Contexts.
See also
IDL Attributes
Typedef, Enum, Union, and Struct Attributes
Parameter Attributes
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho