Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 1.36 KB

uidefault.md

File metadata and controls

58 lines (43 loc) · 1.36 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: uidefault
uidefault (C++ COM Attribute)
10/02/2018
vc-attr.uidefault
uidefault attribute
200de0e0-2e34-40a2-bae4-8d485a62264d

uidefault

Indicates that the type information member is the default member for display in the user interface.

Syntax

[uidefault]

Remarks

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

Example

The following code shows a sample of uidefault:

// cpp_attr_ref_uidefault.cpp
// compile with: /LD
#include "unknwn.h"
[module(name="MyLib")];

[object, uuid("9E66A290-4365-11D2-A997-00C04FA37DDB")]
__interface ICustom{
   HRESULT Custom([in] long l, [out, retval] long *pLong);
   [uidefault]HRESULT id0([in] long l);
   [uidefault]HRESULT id1([in] long l);

   [uidefault, propget] HRESULT get_y(int *y);
   [uidefault, propput] HRESULT put_y(int y);
};

Requirements

Attribute context Value
Applies to Interface method
Repeatable No
Required attributes None
Invalid attributes None

For more information about the attribute contexts, see Attribute Contexts.

See also

IDL Attributes
Method Attributes