CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2012
    Posts
    1

    Cool detect application launch & file change

    i am totally new to this and i apologize in advance for sounding stupid and sorry if this is not the right place to ask..
    (OS Windows)how do i detect when a file has been changed ? do i need to monitor this file and check the last modified date&time? (how do i do this?)
    furthermore how do i detect a certain application launch?

    ... thanxxx ...

  2. #2
    Join Date
    Jul 2005
    Posts
    19

    Re: detect application launch & file change

    Detecting application, you can do via named objects like mutex and all.
    Regarding file notification, please go through below link:
    http://stackoverflow.com/questions/9...ification-in-c

    cheers!!!
    Vatsa
    www.objectiveprogramming.com

  3. #3
    Join Date
    Jan 2009
    Posts
    1,689

    Re: detect application launch & file change

    A daemon is usually the best way to detect things like that. They are usually registered as a service and start on startup.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: detect application launch & file change

    Quote Originally Posted by snehula View Post
    ... (OS Windows)how do i detect when a file has been changed ?
    You could try:
    FindFirstChangeNotification / FindFirstChangeNotification / FindCloseChangeNotification
    or
    ReadDirectoryChangesW
    Victor Nijegorodov

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