Skip to content

Commit 1bab575

Browse files
authored
Merge pull request #5694 from Rageking8/structure-error-references-in-range-c3711-c3740
Structure error references in range [C3711, C3740]
2 parents 6f79d19 + b52a124 commit 1bab575

23 files changed

+163
-105
lines changed

docs/error-messages/compiler-errors-2/compiler-error-c3711.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3711"
32
title: "Compiler Error C3711"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3711"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3711"]
66
helpviewer_keywords: ["C3711"]
7-
ms.assetid: 26d581cc-2153-4ee0-b814-a371184be3e1
87
---
98
# Compiler Error C3711
109

11-
'method': an non-managed event source method must return void or an integral type
10+
> 'method': an non-managed event source method must return void or an integral type
11+
12+
## Remarks
1213

1314
You defined a method in the event source that did not return void or an integral type. To fix this error, make the event and event handler have a return type of **`void`** or an integral type such as **`int`** or **`long`**.
1415

15-
The following sample generates C3711:
16+
## Example
17+
18+
The following example generates C3711:
1619

1720
```cpp
1821
// C3711.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3712.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3712"
32
title: "Compiler Error C3712"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3712"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3712"]
66
helpviewer_keywords: ["C3712"]
7-
ms.assetid: 65b1fcaf-be89-4c55-9e40-25ec03457253
87
---
98
# Compiler Error C3712
109

11-
'method': an event handler method must return the same type as the source 'method'
10+
> 'method': an event handler method must return the same type as the source 'method'
11+
12+
## Remarks
1213

1314
You defined an event handler method that did not return the same type as the source event method. To fix this error, give the event handler method the same return type as that of the source event method.
1415

15-
The following sample generates C3712:
16+
## Example
17+
18+
The following example generates C3712:
1619

1720
```cpp
1821
// C3712.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3713.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3713"
32
title: "Compiler Error C3713"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3713"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3713"]
66
helpviewer_keywords: ["C3713"]
7-
ms.assetid: 75c6b9b6-955b-49bd-9bc8-ced88b496a1f
87
---
98
# Compiler Error C3713
109

11-
'method': an event handler method must have the same function parameters as the source 'method'
10+
> 'method': an event handler method must have the same function parameters as the source 'method'
11+
12+
## Remarks
1213

1314
You defined an event handler method that did not use the same parameters as the source event method. To fix this error, give the event handler method the same parameters as those of the source event method.
1415

15-
The following sample generates C3713:
16+
## Example
17+
18+
The following example generates C3713:
1619

1720
```cpp
1821
// C3713.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3714.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3714"
32
title: "Compiler Error C3714"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3714"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3714"]
66
helpviewer_keywords: ["C3714"]
7-
ms.assetid: 17718f75-5a37-4e42-912b-487e91008a95
87
---
98
# Compiler Error C3714
109

11-
'method': an event handler method must have the same calling convention as the source 'method'
10+
> 'method': an event handler method must have the same calling convention as the source 'method'
11+
12+
## Remarks
1213

1314
You defined an event handler method that did not use the same calling convention as the source event method. To fix this error, give the event handler method the same calling conventions as those of the source event method. For example, in the code below, make the calling conventions of `handler1` and `event1` match ([__cdecl](../../cpp/cdecl.md) or [__stdcall](../../cpp/stdcall.md) or others). Removing calling convention keywords from both declarations will also solve the problem, and cause `event1` and `handler1` to default to the [thiscall](../../cpp/thiscall.md) calling convention. See [Calling Conventions](../../cpp/calling-conventions.md) for more information.
1415

15-
The following sample generates C3714:
16+
## Example
17+
18+
The following example generates C3714:
1619

1720
```cpp
1821
// C3714.cpp
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
description: "Learn more about: Compiler Error C3715"
32
title: "Compiler Error C3715"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3715"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3715"]
66
helpviewer_keywords: ["C3715"]
7-
ms.assetid: ee5dce88-ddc4-4bdb-9464-47467ce1674f
87
---
98
# Compiler Error C3715
109

11-
'pointer': must be a pointer to 'class'
10+
> 'pointer': must be a pointer to 'class'
11+
12+
## Remarks
1213

1314
You specified a pointer in [`__hook`](../../cpp/hook.md) or [`__unhook`](../../cpp/unhook.md) that did not point to a valid class. To fix this error, ensure that your **`__hook`** and **`__unhook`** calls specify pointers to valid classes.

docs/error-messages/compiler-errors-2/compiler-error-c3717.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3717"
32
title: "Compiler Error C3717"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3717"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3717"]
66
helpviewer_keywords: ["C3717"]
7-
ms.assetid: ae4fceb1-2583-4577-b2f1-40971a017055
87
---
98
# Compiler Error C3717
109

11-
'method': a method that fires events cannot be defined
10+
> 'method': a method that fires events cannot be defined
11+
12+
## Remarks
1213

1314
You declared an event method that includes an implementation. An [__event](../../cpp/event.md) method declaration cannot have a definition. To fix this error, ensure that no event method declarations have definitions. For example, in the code below, remove the function body from the `event1` declaration as indicated by the comments.
1415

15-
The following sample generates C3717:
16+
## Example
17+
18+
The following example generates C3717:
1619

1720
```cpp
1821
// C3717.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3718.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3718"
32
title: "Compiler Error C3718"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3718"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3718"]
66
helpviewer_keywords: ["C3718"]
7-
ms.assetid: 346b5205-c44d-49d3-b66a-96417d3d6986
87
---
98
# Compiler Error C3718
109

1110
> can only call '*event*' in the context of a member function of the receiving class
1211
12+
## Remarks
13+
1314
The event can only be called from the receiving class.
1415

1516
## Example
1617

17-
The following sample generates C3718:
18+
The following example generates C3718:
1819

1920
```cpp
2021
// C3718.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3719.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3719"
32
title: "Compiler Error C3719"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3719"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3719"]
66
helpviewer_keywords: ["C3719"]
7-
ms.assetid: d0d59d4e-babb-4480-9ef7-70cf1a28165c
87
---
98
# Compiler Error C3719
109

11-
'interface': an interface based event source can only be used for COM events
10+
> 'interface': an interface based event source can only be used for COM events
11+
12+
## Remarks
1213

1314
You declared an interface in a non-COM context.
1415

15-
The following sample generates C3719:
16+
## Example
17+
18+
The following example generates C3719:
1619

1720
```cpp
1821
// C3719a.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3721.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Error C3721"
32
title: "Compiler Error C3721"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3721"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3721"]
66
helpviewer_keywords: ["C3721"]
7-
ms.assetid: c696ca38-3e00-4875-abbe-7bce0f46930e
87
---
98
# Compiler Error C3721
109

11-
'signature': incompatible signature for event
10+
> 'signature': incompatible signature for event
11+
12+
## Remarks
1213

1314
An event was declared incorrectly. For more information, see [__event](../../cpp/event.md).
1415

docs/error-messages/compiler-errors-2/compiler-error-c3722.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3722"
32
title: "Compiler Error C3722"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3722"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3722"]
66
helpviewer_keywords: ["C3722"]
7-
ms.assetid: 3cb28363-5eff-4548-bd0d-d5c615846353
87
---
98
# Compiler Error C3722
109

11-
a generic event is not allowed
10+
> a generic event is not allowed
11+
12+
## Remarks
1213

1314
The compiler only allows generic classes, structs, and functions. For more information, see [Generics](../../extensions/generics-cpp-component-extensions.md).
1415

15-
The following sample generates C3722:
16+
## Example
17+
18+
The following example generates C3722:
1619

1720
```cpp
1821
// C3722.cpp

0 commit comments

Comments
 (0)