Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ref (C++)

Identifies a reference pointer.

[ref]

The ref C++ attribute has the same functionality as the ref MIDL attribute.

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 ); 
};
Attribute Context

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.