using CLSCTX_ALL fails with Microsoft Office applications, correct the last change to use CLSCTX_SERVER only (see #9868)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -538,8 +538,13 @@ bool wxAutomationObject::CreateInstance(const wxString& classId) const
 | 
				
			|||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // start a new copy of Excel, grab the IDispatch interface
 | 
					    // get the server IDispatch interface
 | 
				
			||||||
    if (FAILED(CoCreateInstance(clsId, NULL, CLSCTX_ALL, IID_IDispatch, (void**)&m_dispatchPtr)))
 | 
					    //
 | 
				
			||||||
 | 
					    // NB: using CLSCTX_INPROC_HANDLER results in failure when getting
 | 
				
			||||||
 | 
					    //     Automation interface for Microsoft Office applications so don't use
 | 
				
			||||||
 | 
					    //     CLSCTX_ALL which includes it
 | 
				
			||||||
 | 
					    if (FAILED(CoCreateInstance(clsId, NULL, CLSCTX_SERVER, IID_IDispatch,
 | 
				
			||||||
 | 
					                                (void**)&m_dispatchPtr)))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        wxLogWarning(wxT("Cannot start an instance of this class."));
 | 
					        wxLogWarning(wxT("Cannot start an instance of this class."));
 | 
				
			||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user