Single instance of windows form application

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Prats

    #1

    Single instance of windows form application

    I have a windows form application developed in C++/CLR
    How can I verify that only one instance of the application is running on the
    user system at any given time.

    Thanks

  • David Lowndes

    #2
    Re: Single instance of windows form application

    >I have a windows form application developed in C++/CLR
    >How can I verify that only one instance of the application is running on the
    >user system at any given time.
    Have a look on MSDN for Knowledge Base article 243953 - "How to limit
    32-bit applications to one instance in Visual C++". It uses
    CreateMutex to create a unique named item. Also beware that if you
    want to ensure a single instance per-machine in a TS environment, you
    need to prefix the mutex name with "Global".

    Dave

    Comment

    Working...