CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 1999
    Location
    Pune,India
    Posts
    5

    To find running instance



    Hi,


    How to find a running instance during installation? Any clues? please help.


    regards

    Deepak

  2. #2
    Join Date
    Apr 1999
    Posts
    6

    Re: To find running instance



    hDeskWnd = GetDesktopWindow, gives the desktop window. All the the other windows are its children. Using the desktop window pointer,

    while(null != (hChildWnd = (GetWindow(hDeskWnd ,5)))

    {

    GetWindowTextA(hChildWnd,strBuffer,bufLen);

    Now compare the strBuffer to your window title which appears on the top left corner of your application, if it matches, your application is running

    }

    GetWindow - gives all the children of a given window, for desktop all the running application windows !!!


    If you want to do it from Installation, check the option to call a dll function in the installation tool, the functions are in system32\user32.dll.

    Good luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured