I am trying to get access to an running instance of an application, Rational Rhapsody, through COM. I am trying to use the C++/CLI COM calls.
From C++ calling:
rhapsody::RPApplication^ App = safe_cast<rhapsody::RPApplication^>( Marshal::GetActiveObject("Rhapsody.Application"));
Causes a COM Exception : 800401E3 (Operation Unavailable)
But, using Marshal::GetActiveObject("Word.Application")
works just fine. Using gcnew rhapsody::RPApplication()
works fine to make a new instance and the same code in C#:
rhapsody.RPApplication App = (rhapsody.RPApplication) Marshal.GetActiveObject("Rhapsody.Application")
works just fine. Any ideas why it doesn't work from C++/CLI?