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
Copy file name to clipboardExpand all lines: docs/mfc/reference/connection-maps.md
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ OLE controls are able to expose interfaces to other applications. These interfac
12
12
13
13
The Microsoft Foundation Class Library offers a programming model that supports connection points. In this model, "connection maps" are used to designate interfaces or connection points for the OLE control. Connection maps contain one macro for each connection point. For more information on connection maps, see the [CConnectionPoint](../../mfc/reference/cconnectionpoint-class.md) class.
14
14
15
-
Typically, a control will support just two connection points: one for events and one for property notifications. These are implemented by the `COleControl` base class and require no additional work by the control writer. Any additional connection points you want to implement in your class must be added manually. To support connection maps and points, MFC provides the following macros:
15
+
Typically, a control supports just two connection points: one for events and one for property notifications. These are implemented by the `COleControl` base class and require no extra work by the control writer. Any other connection points you want to implement in your class must be added manually. To support connection maps and points, MFC provides the following macros:
16
16
17
17
### Connection Map Declaration and Demarcation
18
18
@@ -53,7 +53,7 @@ Specifies the name of the local class that implements the connection point.
53
53
54
54
### Remarks
55
55
56
-
In the declaration (.h) file that defines the member functions for your class, start the connection point with the BEGIN_CONNECTION_PART macro, then add the CONNECTION_IID macro and any other member functions you wish to implement, and complete the connection point map with the END_CONNECTION_PART macro.
56
+
In the declaration (.h) file that defines the member functions for your class, start the connection point with the BEGIN_CONNECTION_PART macro. Then add the CONNECTION_IID macro and any other member functions you wish to implement. Finally, complete the connection point map with the END_CONNECTION_PART macro.
57
57
58
58
### Requirements
59
59
@@ -91,7 +91,7 @@ The interface ID of the interface called by the connection point.
91
91
92
92
### Remarks
93
93
94
-
The *iid* argument is an interface ID used to identify the interface that the connection point will call on its connected sinks. For example:
94
+
The *iid* argument is an interface ID used to identify the interface that the connection point calls on its connected sinks. For example:
implements a connection map, with a connection point, that calls the `IID_ISinkInterface` interface.
181
+
implements a connection map, with a connection point, that calls the `IID_ISinkInterface` interface.
182
182
183
183
### Requirements
184
184
@@ -208,16 +208,14 @@ A pointer to the object that implements the interface.
208
208
*iid*<br/>
209
209
The interface ID of the connection.
210
210
211
-
*bRefCount*
212
-
211
+
*bRefCount*<br/>
213
212
For out-of-process connections, this parameter must be TRUE, and indicates that creating the connection should cause the reference count of *pUnkSink* to be incremented.
214
213
215
214
For in-process connections, TRUE indicates that creating the connection should cause the reference count of *pUnkSink* to be incremented. FALSE indicates that the reference count should not be incremented.
216
215
217
-
**Warning**: In general, it cannot be predicted which connections are in-process and which connections are out-of-process, so it is recommended to always set this parameter to TRUE.
218
-
219
-
*pdwCookie.*
216
+
**Warning**: In general, it can't be predicted which connections are in-process and which connections are out-of-process, so it is recommended to always set this parameter to TRUE.
220
217
218
+
*pdwCookie.*<br/>
221
219
A pointer to a DWORD where a connection identifier is returned. This value should be passed as the *dwCookie* parameter to `AfxConnectionUnadvise` when disconnecting the connection.
222
220
223
221
### Return Value
@@ -257,15 +255,13 @@ A pointer to the object that implements the interface.
257
255
The interface ID of the connection point interface.
258
256
259
257
*bRefCount*<br/>
260
-
261
258
For out-of-process connections, this parameter must be TRUE, and indicates that creating the connection should cause the reference count of *pUnkSink* to be decremented.
262
259
263
260
For in-process connections, TRUE indicates that creating the connection should cause the reference count of *pUnkSink* to be decremented. FALSE indicates that the reference count should not be decremented.
264
261
265
262
**Warning**: In general, it cannot be predicted which connections are in-process and which connections are out-of-process, so it is recommended to always set this parameter to TRUE.
266
263
267
264
*dwCookie*<br/>
268
-
269
265
The connection identifier returned by `AfxConnectionAdvise`.
0 commit comments