GetActiveObject() vs. GetObject() — MK_E_UNAVAILABLE Error
问题 All: I am having some problems translating some VBA code to C#. We have a 3rd party app which acts as a local COM server. In the VBA code we use GetObject() to get a reference to the existing object e.g. Set appHandle = GetObject("", ProgId) this works fine. I added a reference to the 3rd party app in our c# code, and used Marshal.GetActiveObject() to try and get a reference to a running instance. e.g. var appModel = (IAppCoModel)Marshal.GetActiveObject(ProgId); but I keep getting a MK_E