summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJøger Hansegård <joger.hansegard@qt.io>2023-09-13 12:54:01 +0200
committerJøger Hansegård <joger.hansegard@qt.io>2023-09-26 14:19:23 +0200
commit8ee924262ebded93dbe7799fd042cc9ccd558bc4 (patch)
tree7c5e173fd401fe39c8fc3e18942bc0e322efaa1a /src
parent6235df9bfb40d93751104c74a4ee433e17aefba9 (diff)
Describe how to deal with COM reentrancy problems in ActiveQt
If two COM objects in two single threaded apartments can communicate and both objects can initiate a call (typical situation if both client and server have an user interface), the implementations must deal with reentrancy problems. This is not always an obvious property of out-of- process COM servers, and documenting it can help developers to solve or prevent such issues. Pick-to: 6.5 6.6 Change-Id: Ibb1bb7e7a58709fdb23feb3ae68c9cbf62200d4b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/activeqt/doc/src/qtaxserver.qdoc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/activeqt/doc/src/qtaxserver.qdoc b/src/activeqt/doc/src/qtaxserver.qdoc
index ced88a3..c7fa1ff 100644
--- a/src/activeqt/doc/src/qtaxserver.qdoc
+++ b/src/activeqt/doc/src/qtaxserver.qdoc
@@ -665,6 +665,17 @@
Attempting to activate an in-process COM server that includes modules such
as Qt Quick may result in a crash after unloading the COM server.
+ \section3 Crash or unexpected behavior during outgoing COM calls
+
+ Be aware that an out-of-process COM server will be processing its message
+ queue while it is performing an outgoing call to the client. This can lead to
+ unexpected behavior or crash if the client is at the same time calling the
+ server. In this situation, the incoming call will be executed in the server
+ before the outgoing call returns. In particular, if the client closes
+ an ActiveX control while the control is calling back into the client, this
+ can lead to crash. Such reentrancy problems can be mitigated using message
+ filters (IMessageFilter and CoRegisterMessageFilter).
+
\section2 Debugging Runtime Errors
To debug an in-process server in Visual Studio, set the server project