Book a Demo

Author Topic: Cannot connect to running instance on Win7  (Read 3469 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Cannot connect to running instance on Win7
« on: May 29, 2011, 01:47:51 pm »
Hi,

In my C# tools I use
Code: [Select]
return ((EA.App)Marshal.GetActiveObject("EA.App")).Repository;to get a reference to the running instance of EA.
When testing this on my Win7 (64 bit) system it didn't work. I always got a Com_Exception.
After a whole bit of re-installing, re-starting, re-compiling and searching google I finally found the problem.
When I was testing that I ran the tool directly from my IDE (SharpDevelop).
The IDE always starts as Administrator because it needs access to certain system settings.
EA normally isn't started as Administrator.
Apparently the Marshal.GetActiveObject() is only able to access application that run with the same security level. So running EA as administrator solved my problem.

Just thought I mention it here for the next poor soul who runs into this problem.

Geert
« Last Edit: May 29, 2011, 01:48:26 pm by Geert.Bellekens »