You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Second, the [DECLARE_GET_CONTROLLING_UNKNOWN](../atl/reference/aggregation-and-class-factory-macros.md#declare_get_controlling_unknown) macro is also added.
47
+
Second, the [DECLARE_GET_CONTROLLING_UNKNOWN](../../atl/reference/aggregation-and-class-factory-macros.md#declare_get_controlling_unknown) macro is also added.
48
48
49
49
## Example
50
50
@@ -93,4 +93,4 @@ For more information about the attribute contexts, see [Attribute Contexts](attr
93
93
[Typedef, Enum, Union, and Struct Attributes](typedef-enum-union-and-struct-attributes.md)<br/>
Identifies the coclass as an application object, which is associated with a full .exe application, and indicates that the functions and properties of the coclass are globally available in this [type library](../mfc/automation-clients-using-type-libraries.md).
17
+
Identifies the coclass as an application object, which is associated with a full .exe application, and indicates that the functions and properties of the coclass are globally available in this [type library](../../mfc/automation-clients-using-type-libraries.md).
Copy file name to clipboardExpand all lines: docs/windows/attributes/attribute-contexts.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ C++ attributes can be described using four basic fields: the target they can be
18
18
19
19
This field describes the different C++ language elements that are legal targets for the specified attribute. For instance, if an attribute specifies "class" in the **Applies To** field, this indicates that the attribute can only be applied to a legal C++ class. If the attribute is applied to a member function of a class, a syntax error would result.
20
20
21
-
For more information, see [Attributes by Usage](../windows/attributes-by-usage.md).
21
+
For more information, see [Attributes by Usage](attributes-by-usage.md).
22
22
23
23
## Repeatable
24
24
@@ -34,4 +34,4 @@ This field lists other attributes that are incompatible with the specified attri
Copy file name to clipboardExpand all lines: docs/windows/attributes/attribute-programming-faq.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ An HRESULT is a simple data type that is often used as a return value by attribu
53
53
54
54
## <aname="vcconattributeprogrammmingfaqanchor2"></a> When do I have to specify the parameter name for an attribute?
55
55
56
-
In most cases, if the attribute has a single parameter, that parameter is named. This name is not required when inserting the attribute in your code. For example, the following usage of the [aggregatable](../windows/aggregatable.md) attribute:
56
+
In most cases, if the attribute has a single parameter, that parameter is named. This name is not required when inserting the attribute in your code. For example, the following usage of the [aggregatable](aggregatable.md) attribute:
57
57
58
58
```cpp
59
59
[coclass, aggregatable(value=allowed)]
@@ -77,17 +77,17 @@ However, the following attributes have single, unnamed parameters:
## <aname="vcconattributeprogrammmingfaqanchor3"></a> Can I use comments in an attribute block?
93
93
@@ -119,11 +119,11 @@ You may have a nonattributed ATL project, which has an .idl file, and you may wa
119
119
120
120
## <aname="vcconattributeprogrammmingfaqanchor6"></a> How can I use an .idl file in an attributed project?
121
121
122
-
You may have a .idl file that you want to use in your ATL attributed project. In this case, you would use the [importidl](../windows/importidl.md) attribute, compile the .idl file to a .h file (see the [MIDL Property Pages](../ide/midl-property-pages.md) in the project's **Property Pages** dialog box), and then include the .h file in your project.
122
+
You may have a .idl file that you want to use in your ATL attributed project. In this case, you would use the [importidl](importidl.md) attribute, compile the .idl file to a .h file (see the [MIDL Property Pages](../../ide/midl-property-pages.md) in the project's **Property Pages** dialog box), and then include the .h file in your project.
123
123
124
124
## <aname="vcconattributeprogrammmingfaqanchor7"></a> Can I modify code that is injected by an attribute?
125
125
126
-
Some attributes inject code into your project. You can see the injected code by using the [/Fx](../build/reference/fx-merge-injected-code.md) compiler option. It is also possible to copy code from the injected file and paste it into your source code. This allows you to modify the behavior of the attribute. However, you may have to modify other parts of your code as well.
126
+
Some attributes inject code into your project. You can see the injected code by using the [/Fx](../../build/reference/fx-merge-injected-code.md) compiler option. It is also possible to copy code from the injected file and paste it into your source code. This allows you to modify the behavior of the attribute. However, you may have to modify other parts of your code as well.
127
127
128
128
The following sample is the result of copying injected code into a source code file:
129
129
@@ -233,12 +233,12 @@ int main() {}
233
233
234
234
## <a name="vcconattributeprogrammmingfaqhowcaniforwarddeclareanattributedinterface"></a> How can I forward declare an attributed interface?
235
235
236
-
If you are going to make a forward declaration of an attributed interface, you must apply the same attributes to the forward declaration that you apply to the actual interface declaration. You must also apply the [export](../windows/export.md) attribute to your forward declaration.
236
+
If you are going to make a forward declaration of an attributed interface, you must apply the same attributes to the forward declaration that you apply to the actual interface declaration. You must also apply the [export](export.md) attribute to your forward declaration.
237
237
238
238
## <a name="vcconcaniuseattributesonclassderivedfromclassthatalsousesattributesanchor"></a> Can I use attributes on a class derived from a class that also uses attributes?
239
239
240
240
No, using attributes on a class derived from a class that also uses attributes is not supported.
Copy file name to clipboardExpand all lines: docs/windows/attributes/attribute.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,9 +40,9 @@ Indicates if the attribute is to be inherited by subclasses. The compiler provid
40
40
## Remarks
41
41
42
42
> [!NOTE]
43
-
> The **attribute** attribute is now deprecated. Use the common language runtime attribute `System.Attribute` to directly to create user-defined attirbutes. For more information, see [User-Defined Attributes](../windows/user-defined-attributes-cpp-component-extensions.md).
43
+
> The **attribute** attribute is now deprecated. Use the common language runtime attribute `System.Attribute` to directly to create user-defined attirbutes. For more information, see [User-Defined Attributes](user-defined-attributes-cpp-component-extensions.md).
44
44
45
-
You define a [custom attribute](../windows/custom-attributes-cpp.md) by placing the **attribute** attribute on a managed class or struct definition. The name of the class is the custom attribute. For example:
45
+
You define a [custom attribute](custom-attributes-cpp.md) by placing the **attribute** attribute on a managed class or struct definition. The name of the class is the custom attribute. For example:
46
46
47
47
```cpp
48
48
[ attribute(Parameter) ]
@@ -98,9 +98,9 @@ public:
98
98
ref classClassC {};
99
99
```
100
100
101
-
For a list of possible attribute parameter types, see [Custom Attributes](../windows/custom-attributes-cpp.md).
101
+
For a list of possible attribute parameter types, see [Custom Attributes](custom-attributes-cpp.md).
102
102
103
-
See [User-Defined Attributes](../windows/user-defined-attributes-cpp-component-extensions.md) for a discussion on attribute targets.
103
+
See [User-Defined Attributes](user-defined-attributes-cpp-component-extensions.md) for a discussion on attribute targets.
104
104
105
105
The **attribute** attribute has an *AllowMultiple* parameter that specifies whether the custom attribute is single use or multiuse (can appear more than once on the same entity).
106
106
@@ -144,7 +144,7 @@ ref class MyAttr : System::Attribute // OK, but redundant.
144
144
|**Required attributes**|None|
145
145
|**Invalid attributes**|None|
146
146
147
-
For more information about the attribute contexts, see [Attribute Contexts](../windows/attribute-contexts.md).
147
+
For more information about the attribute contexts, see [Attribute Contexts](attribute-contexts.md).
Copy file name to clipboardExpand all lines: docs/windows/attributes/attributes-by-group.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ The C++ attributes are organized into the following functional groups.
19
19
|---------------|-----------------|
20
20
|[COM Attributes](com-attributes.md)|Inject code to support numerous areas of COM development and .NET Framework common language runtime development.|
21
21
|[IDL Attributes](idl-attributes.md)|Enable the modification of the .idl file from a source code file without the use of a wizard and without knowledge of the structure and syntax of that file.|
22
-
|[OLE DB Consumer Attributes](ole-db-consumer-attributes.md)|Inject code—based on the [OLE DB Consumer Templates](../data/oledb/ole-db-consumer-templates-reference.md)—to create a working OLE DB consumer that performs tasks such as opening tables, executing commands, and accessing data.|
22
+
|[OLE DB Consumer Attributes](ole-db-consumer-attributes.md)|Inject code—based on the [OLE DB Consumer Templates](../../data/oledb/ole-db-consumer-templates-reference.md)—to create a working OLE DB consumer that performs tasks such as opening tables, executing commands, and accessing data.|
23
23
|[Compiler Attributes](compiler-attributes.md)|Supplied by the Visual C++ compiler.|
24
24
25
25
For information about how to define custom attributes for your .NET Framework application, see [User-Defined Attributes](user-defined-attributes-cpp-component-extensions.md).
0 commit comments