GIT and the FTM
-
When I call IGlobalInterfaceTable::RevokeInterfaceFromGlobal from a FTM object created in the main STA for an sub-object that was created from a MTA thread, a deadlock seems to occurs while I am revoking the interface (from the STA). Here are the steps: 1) Create an object (that aggregate the FTM) in the main STA 2) Call a function on that object from a MTA thread and from that function create an sub-object (that does uses the FTM) in the STA but register it in the GIT from the MTA. 3) Destroy the object from the STA. When revoking the cookie for the sub-object a deadlock seems to occurs. Any idea for a solution? Should an object always be registered from it own apartment? Does there is some restrictions when using the GIT for FTM objects? Is my problem caused by the MTA not responding at that time? In fact, if I force the creation of the sub-object from the STA instead of waiting when I need it (which will occurs from a call made from a MTA in my case), no deadlock will occurs... I haven't found much "advanced" informations on the GIT and the MSDN documentation is not clear enough about potential problems, limitations and restrictions. Any suggestions? Philippe Mori
-
When I call IGlobalInterfaceTable::RevokeInterfaceFromGlobal from a FTM object created in the main STA for an sub-object that was created from a MTA thread, a deadlock seems to occurs while I am revoking the interface (from the STA). Here are the steps: 1) Create an object (that aggregate the FTM) in the main STA 2) Call a function on that object from a MTA thread and from that function create an sub-object (that does uses the FTM) in the STA but register it in the GIT from the MTA. 3) Destroy the object from the STA. When revoking the cookie for the sub-object a deadlock seems to occurs. Any idea for a solution? Should an object always be registered from it own apartment? Does there is some restrictions when using the GIT for FTM objects? Is my problem caused by the MTA not responding at that time? In fact, if I force the creation of the sub-object from the STA instead of waiting when I need it (which will occurs from a call made from a MTA in my case), no deadlock will occurs... I haven't found much "advanced" informations on the GIT and the MSDN documentation is not clear enough about potential problems, limitations and restrictions. Any suggestions? Philippe Mori
-
When I call IGlobalInterfaceTable::RevokeInterfaceFromGlobal from a FTM object created in the main STA for an sub-object that was created from a MTA thread, a deadlock seems to occurs while I am revoking the interface (from the STA). Here are the steps: 1) Create an object (that aggregate the FTM) in the main STA 2) Call a function on that object from a MTA thread and from that function create an sub-object (that does uses the FTM) in the STA but register it in the GIT from the MTA. 3) Destroy the object from the STA. When revoking the cookie for the sub-object a deadlock seems to occurs. Any idea for a solution? Should an object always be registered from it own apartment? Does there is some restrictions when using the GIT for FTM objects? Is my problem caused by the MTA not responding at that time? In fact, if I force the creation of the sub-object from the STA instead of waiting when I need it (which will occurs from a call made from a MTA in my case), no deadlock will occurs... I haven't found much "advanced" informations on the GIT and the MSDN documentation is not clear enough about potential problems, limitations and restrictions. Any suggestions? Philippe Mori
I have change how objects are destroyed and it seems to works fine... Now I start by destroying sub-object in FinalRelease and then releasing the FTM for that object. In my initial implementation (which was not working in some cases), the FTM was destroyed first (in FinalRelease) but sub-objects were destroyed only by the destructor (automatic objects are used). Also I now aggregate the FTM on demand for each of those object. Philippe Mori