Skip to content

Commit a5929b7

Browse files
committed
Use the recommended TRUE value for AfxConnectionAdvise/Unadvise
In MicrosoftDocs/cpp-docs-pr#4999 we recommended using TRUE but failed to update the sample to follow the recommendation.
1 parent 4bd00e9 commit a5929b7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/mfc/codesnippet/CPP/connection-maps_3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ IUnknown* pUnkSink = mysink.GetInterface(&iid);
1010
//pUnkSrc is IUnknown of server obtained by CoCreateInstance().
1111
//dwCookie is a cookie identifying the connection, and is needed
1212
//to terminate this connection.
13-
AfxConnectionAdvise(pUnkSrc, IID_ISampleSink, pUnkSink, FALSE, &dwCookie);
13+
AfxConnectionAdvise(pUnkSrc, IID_ISampleSink, pUnkSink, TRUE, &dwCookie);

docs/mfc/codesnippet/CPP/connection-maps_4.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ IUnknown* pUnkSink = mysink.GetInterface(&iid);
66
//Terminate a connection between source and sink.
77
//pUnkSrc is IUnknown of server obtained by CoCreateInstance().
88
//dwCookie is a value obtained through AfxConnectionAdvise().
9-
AfxConnectionUnadvise(pUnkSrc, IID_ISampleSink, pUnkSink, FALSE, dwCookie);
9+
AfxConnectionUnadvise(pUnkSrc, IID_ISampleSink, pUnkSink, TRUE, dwCookie);

0 commit comments

Comments
 (0)