P: COM cannot find the running instance, although automation still works
- 1 reply
- 47 views
- Translate
On Windows 11, with Photoshop Beta 28.0.0.3709 running, Marshal.GetActiveObject("Photoshop.Application") returns 0x800401E3 — MK_E_UNAVAILABLE.
On my installation, the registered ProgID points to a different identity from the live document automation object in the Running Object Table (ROT). The live object still exposes the expected _Application interface, and its Open method works normally.
AI managed to implemented a workaround that discovers the live object by its interface, validates the Photoshop installation path, and opens files through that existing instance. In my workflow, opening a PSD could take up to approximately 28 seconds without the workaround. With the script, the COM opening path—including completion of Open—took 439 ms in a measured test. it was tested and confirmed fast opening through the actual Explorer workflow.
Could the team investigate this discovery mismatch and clarify the supported way to connect to the running application? Diagnostic details and working source code are attached.
