CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2005
    Location
    United States
    Posts
    263

    How to capture Visual Studio compile event from external app

    Hi guys,

    I want to write a little program that runs in the background which counts how many times you stop/start Visual Studio in one day. I guess this could be made as a Visual Studio plugin, but I'm not sure. Or maybe just a program (non-plugin, regular windows app) that counts every time the user presses the F5 button. I know I don't use the F5 button in any of my other applications, so the latter would work.

    Does anyone know how to do either of the two things above? Any help would be greatly appreciated.

    Greg Dolley

  2. #2
    Join Date
    Feb 2002
    Posts
    3,788

    Re: How to capture Visual Studio compile event from external app

    Quote Originally Posted by greg_dolley
    ....that counts every time the user presses the F5 button. I know I don't use the F5 button in any of my other applications, so the latter would work.
    Greg Dolley
    what if the user refreshes (hits F5) IE? - i use it all the time.

  3. #3
    Join Date
    Aug 2004
    Posts
    184

    Re: How to capture Visual Studio compile event from external app

    Just a thought, if you want to catch compiles and links, could you watch the processes and then count how many times you see CL.exe and Link.exe run.

  4. #4
    Join Date
    May 2005
    Location
    United States
    Posts
    263

    Re: How to capture Visual Studio compile event from external app

    Quote Originally Posted by Alin
    what if the user refreshes (hits F5) IE? - i use it all the time.
    I do CTRL+R.

    Greg Dolley

  5. #5
    Join Date
    May 2005
    Location
    United States
    Posts
    263

    Re: How to capture Visual Studio compile event from external app

    Quote Originally Posted by f1shrman
    Just a thought, if you want to catch compiles and links, could you watch the processes and then count how many times you see CL.exe and Link.exe run.
    Actually that won't work because when I'm in a web project I sometimes choose to run without compiling.

    Any other ideas? Anyone?

    -Greg Dolley

  6. #6
    Join Date
    Apr 2005
    Location
    Norway
    Posts
    3,934

    Re: How to capture Visual Studio compile event from external app

    Quote Originally Posted by greg_dolley
    Any other ideas? Anyone?
    Your title says:
    Quote Originally Posted by greg_dolley
    How to capture Visual Studio compile event[...]
    Is it 'compile' or 'debug' event you want to capture?

    If you want to capture the compile (or build) event then maybe you can add your application as a 'pre-build event'. You'll find it somewhere under the project settings.

    - petter

  7. #7
    Join Date
    May 2005
    Location
    United States
    Posts
    263

    Re: How to capture Visual Studio compile event from external app

    Quote Originally Posted by wildfrog
    Your title says:
    Is it 'compile' or 'debug' event you want to capture?

    If you want to capture the compile (or build) event then maybe you can add your application as a 'pre-build event'. You'll find it somewhere under the project settings.

    - petter
    Good idea! I actually only need to capture the debug event. Thanks petter!!

    Greg Dolley

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