Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. COM
  4. Windows 7 starting new app instance from Visual Studio 2005

Windows 7 starting new app instance from Visual Studio 2005

Scheduled Pinned Locked Moved COM
csharpvisual-studiocomsysadmin
3 Posts 2 Posters 11 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    StevenS_Dev
    wrote on last edited by
    #1

    Something puzzling is happening and I don't understand why. I tested using both my C# and VB.NET test apps and both result in the same behavior. When I run the application I have the following line (C#):

    m_COMApp = new SignalServer.Application();

    No matter what I do, I always get a new instance of the COM server, even if the server is already up and running. This does not happen in XP and I don't recall it ever happening under Vista (I plan to re-test that this weekend as I have Vista at home). This only happens when I run the COM client directly from within Visual Studio. I even changed my reference to point to another version of the server, and it still wanted to load the server found in the original directory. I decided to run the application by double-clicking in Explorer and then I get the expected behavior. That is, if a server is already running, it will simply attach to the currently running server. Anyone know why I get the other behavior? Some thoughts are: 1) I am on Visual Studio 2005. Maybe this won't happen in 2010. 2) All the applications are 32-bit apps and the OS is 64-bit. Maybe because of the x86 directory names, things get a little messed up? Anyone else experience this? Thanks for any information.

    L 1 Reply Last reply
    0
    • S StevenS_Dev

      Something puzzling is happening and I don't understand why. I tested using both my C# and VB.NET test apps and both result in the same behavior. When I run the application I have the following line (C#):

      m_COMApp = new SignalServer.Application();

      No matter what I do, I always get a new instance of the COM server, even if the server is already up and running. This does not happen in XP and I don't recall it ever happening under Vista (I plan to re-test that this weekend as I have Vista at home). This only happens when I run the COM client directly from within Visual Studio. I even changed my reference to point to another version of the server, and it still wanted to load the server found in the original directory. I decided to run the application by double-clicking in Explorer and then I get the expected behavior. That is, if a server is already running, it will simply attach to the currently running server. Anyone know why I get the other behavior? Some thoughts are: 1) I am on Visual Studio 2005. Maybe this won't happen in 2010. 2) All the applications are 32-bit apps and the OS is 64-bit. Maybe because of the x86 directory names, things get a little messed up? Anyone else experience this? Thanks for any information.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Are you running Visual Studio with UAC elevation? Best Wishes, -David Delaune

      S 1 Reply Last reply
      0
      • L Lost User

        Are you running Visual Studio with UAC elevation? Best Wishes, -David Delaune

        S Offline
        S Offline
        StevenS_Dev
        wrote on last edited by
        #3

        Aha! Thanks. That was the problem. I turned off UAC and everything works just as I would expect (like on XP)! I always leave UAC turned on because it's great for finding issues our customers will run into. I didn't even think about turning it off this time around.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups